Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Building DLL library with CDT
Building DLL library with CDT [message #54375] Mon, 16 December 2002 22:13 Go to next message
Eclipse UserFriend
Originally posted by: alex.gestalt.com

Hi,

I am trying to build a DLL library from a C code. I installed CygWin and
can compile and run the proverbial "Hello world" - just to get the feel
for it.

However, I do not have the makefile for building a DLL, nor have I been
able to find it by searching Google.

Does anyone have a working example that I could use?

On another note, I have not been able to run my hello.c program in debug
mode.
This is what I find in the log:

!ENTRY org.eclipse.cdt.launch 4 150 Dec 16, 2002 15:15:17.155
!MESSAGE Failed Launching CDI Debugger : Error initializing: Timedout
!STACK 0
org.eclipse.cdt.debug.core.cdi.CDIException: Error initializing: Timedout
at
org.eclipse.cdt.debug.mi.core.GDBDebugger.createLaunchSessio n(GDBDebugger.java:49)
...

What am I missing?

Any clues will be greatly appreciated.

Alex Molochnikov
Gestalt Corporation
Re: Building DLL library with CDT [message #54429 is a reply to message #54375] Tue, 17 December 2002 00:52 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 4
Registered: July 2009
Junior Member
You should read the FAQ at www.mingw.org
It will answer most of your questions about DLL building. The MinGW and
Cygwin tools share the same back-end. (GCC), but unless you need/want a
POSIX emulation layer, MinGW is probably the better choice.

Make sure that the -g option is set in your build command (the gcc line, not
the make line) to build a debug version of your code.

HTH,
jb.

"Alex Molochnikov" <alex@gestalt.com> wrote in message
news:atlj5u$8lq$1@rogue.oti.com...
> Hi,
>
> I am trying to build a DLL library from a C code. I installed CygWin and
> can compile and run the proverbial "Hello world" - just to get the feel
> for it.
>
> However, I do not have the makefile for building a DLL, nor have I been
> able to find it by searching Google.
>
> Does anyone have a working example that I could use?
>
> On another note, I have not been able to run my hello.c program in debug
> mode.
> This is what I find in the log:
>
> !ENTRY org.eclipse.cdt.launch 4 150 Dec 16, 2002 15:15:17.155
> !MESSAGE Failed Launching CDI Debugger : Error initializing: Timedout
> !STACK 0
> org.eclipse.cdt.debug.core.cdi.CDIException: Error initializing: Timedout
> at
>
org.eclipse.cdt.debug.mi.core.GDBDebugger.createLaunchSessio n(GDBDebugger.ja
va:49)
> ..
>
> What am I missing?
>
> Any clues will be greatly appreciated.
>
> Alex Molochnikov
> Gestalt Corporation
>
Re: Building DLL library with CDT [message #54568 is a reply to message #54429] Tue, 17 December 2002 23:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex.gestalt.com

Jonathan Brandmeyer wrote:

> You should read the FAQ at www.mingw.org
> It will answer most of your questions about DLL building. The MinGW and
> Cygwin tools share the same back-end. (GCC), but unless you need/want a
> POSIX emulation layer, MinGW is probably the better choice.

> Make sure that the -g option is set in your build command (the gcc line, not
> the make line) to build a debug version of your code.

Thanks. I installed MinGW and followed your advice. The DLL is built
allright, and I can execute my testcase, but debugging through Eclipse is
still a problem. I am getting different errors, depending on my Debug
settings.

When I select "GDB Debugger" in the Debugger tab of the Launch
Configurations window, and try to start the Debug, an attention panel pops
up: "Exception occurred while launching configuration. See log for more
information. Reason: failed launching CDI Debugger: No symbol table is
loaded. Use the "file" command."

And this is the log:

!ENTRY org.eclipse.debug.ui 4 120 Dec 17, 2002 16:06:18.359
!MESSAGE Error logged from Debug UI:
!STACK 1
org.eclipse.core.runtime.CoreException[150]:
org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException: No symbol table is
loaded. Use the "file" command.
at
org.eclipse.cdt.debug.mi.core.cdi.SourceManager.setAutoSolib (SourceManager.java:100)
at
org.eclipse.cdt.debug.mi.core.GDBDebugger.initializeLibrarie s(GDBDebugger.java:28)
at
org.eclipse.cdt.debug.mi.core.GDBDebugger.createLaunchSessio n(GDBDebugger.java:44)
at
org.eclipse.cdt.launch.internal.LocalCLaunchConfigurationDel egate.launch(LocalCLaunchConfigurationDelegate.java:84)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:136)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationDialog$10.run(LaunchConfigurationDialog.java:2299)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:98)
!ENTRY org.eclipse.cdt.launch 4 150 Dec 17, 2002 16:06:18.359
!MESSAGE Failed Launching CDI Debugger : No symbol table is loaded. Use
the "file" command.
!STACK 0
org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException: No symbol table is
loaded. Use the "file" command.
at
org.eclipse.cdt.debug.mi.core.cdi.SourceManager.setAutoSolib (SourceManager.java:100)
at
org.eclipse.cdt.debug.mi.core.GDBDebugger.initializeLibrarie s(GDBDebugger.java:28)
at
org.eclipse.cdt.debug.mi.core.GDBDebugger.createLaunchSessio n(GDBDebugger.java:44)
at
org.eclipse.cdt.launch.internal.LocalCLaunchConfigurationDel egate.launch(LocalCLaunchConfigurationDelegate.java:84)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:136)
at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchCon figurationDialog$10.run(LaunchConfigurationDialog.java:2299)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:98)

I tried selecting "Cygwin GDB Debugger" option, but this does not work
either, bringing up the following attention panel: "The execution of
program is suspended because of error". The detail message is: "No
executable specified, use 'target exec'".

The log in this case is empty.

Interestingly enough, both times the gdb.exe process is launched - I can
see it in my Task Manager window.

Perhaps you or someone else knowledgeable in CDT/Debug interaction can
glimpse something peculiar in the above traceback that I fail to see. In
particular, what is this "file" command the Debugger is complaining about?

Regards,

Alex Molochnikov
Gestalt Corporation
Re: Building DLL library with CDT [message #54592 is a reply to message #54375] Wed, 18 December 2002 18:14 Go to previous message
Judy N. Green is currently offline Judy N. GreenFriend
Messages: 149
Registered: July 2009
Senior Member
"Alex Molochnikov" <alex@gestalt.com> wrote in message
news:atlj5u$8lq$1@rogue.oti.com...
| Hi,
|
| I am trying to build a DLL library from a C code. I installed CygWin and
| can compile and run the proverbial "Hello world" - just to get the feel
| for it.
|
| However, I do not have the makefile for building a DLL, nor have I been
| able to find it by searching Google.
|
| Does anyone have a working example that I could use?
|
| On another note, I have not been able to run my hello.c program in debug
| mode.
| This is what I find in the log:
|
| !ENTRY org.eclipse.cdt.launch 4 150 Dec 16, 2002 15:15:17.155
| !MESSAGE Failed Launching CDI Debugger : Error initializing: Timedout
| !STACK 0
| org.eclipse.cdt.debug.core.cdi.CDIException: Error initializing: Timedout
| at
|
org.eclipse.cdt.debug.mi.core.GDBDebugger.createLaunchSessio n(GDBDebugger.ja
va:49)
| ..
|
| What am I missing?

Do you have version 5.2.1 of the GDB installed?
The follwoing is from the CDT User Doc:

Note:
The CDT currently uses GDB version 5.2.1 as the default. If you are using
Cygwin the default version they currently install is too old. You need gdb
5.2.1, which should be in the gdb package dated 20020718-1

-Judy

|
| Any clues will be greatly appreciated.
|
| Alex Molochnikov
| Gestalt Corporation
|
Previous Topic:Search
Next Topic:RE: BUG#28390: Include the GNU Make manual with the distribution
Goto Forum:
  


Current Time: Thu Jul 18 19:26:36 GMT 2024

Powered by FUDForum. Page generated in 0.04351 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top