User forums > Using Code::Blocks
add-stdcall-alias
iorec:
helo.
i have a dev-cpp project that compiles a .dll with the --add-stdcall-alias linker option. the .dll then exports my function twice as expected.
when i import the project in codeblocks it compiles but the .dll only has the function exported once. i checked and the linker options in codeblocks also have the --add-stdcall-alias option set.
any ideas?
Pecan:
Could you turn on full compiler logging and post the relevant info here.
//-- Full Compile Logging --
Main Menu->Settings->Compiler and Debugger->"Other"->Compiler logging = "Full command line".
In future, would you please mention in your messages the full
CodeBlocks version you're using and the system you're running.
You can find this info in the menu item Help/About/Information.
Or double click the "Version" banner on the Start Here Page, causing it to copy to your clipboard..
iorec:
ok. i am using:
Version 1.0 revision 3164 (2006-11-01 12:09:43) gcc 3.4.5 Windows/unicode
the same problem appears with RC1.
i am not sure which is the relevant info of the compiler log, but here you see that i really specified --add-stdcall-alias:
mingw32-g++.exe -shared -Wl,--output-def=libFiducialTracker.def -Wl,--out-implib=libFiducialTracker.a -Wl,--dll -LC:\Dev\Dev-Cpp\lib .objs\FiducialObject.o .objs\FiducialTracker.o .objs\FreeFrame.o .objs\libfidtrack\dump_graph.o .objs\libfidtrack\fidtrack120.o .objs\libfidtrack\fidtrackX.o .objs\libfidtrack\segment.o .objs\libfidtrack\threshold.o .objs\libfidtrack\tiled_bernsen_threshold.o .objs\libfidtrack\topologysearch.o .objs\libfidtrack\treeidmap.o -o FiducialTracker.dll --add-stdcall-alias -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
Creating library file: libFiducialTracker.a
Process terminated with status 0 (0 minutes, 3 seconds)
Pecan:
Isn't it supposed to be "-Wl,-add-stdcall-alias" ?
Googling:" -add-stdcall-alias"
This may be of some help:
Stdcall and DLL tools of MSVC and MinGW
what does your .def file look like?
There have been other dicussions on this forum about dll symbols. Did a search help?
iorec:
i also tried with
-Wl, -add-stdcall-alias
but still i only get my function exportet once.
http://www.willus.com/mingw/yongweiwu_stdcall.html
also only tells me to use:
--add-stdcall-alias
all searches on the problem end in the resolution to add
--add-stdcall-alias
to the linker options, which i already have.
i don't use a .def file, they seem to be optional. but a .def file is always created when i compile. it looks as follows:
EXPORTS
plugMain@12 @1
note, that the same unchanged code/project exports 2 functions correctly with dev-cpp.
Navigation
[0] Message Index
[#] Next page
Go to full version