User forums > Using Code::Blocks
winapi under linux
stahta01:
--- Quote from: Samuel G. on June 18, 2010, 11:54:50 am ---3. Sorry, *.dll, instead of *.so, I mean. My Project is a shared library project, but still mingw-gcc only outputs a .dll, but no .lib file.
This are the command line options:
--- Quote ----------------- Build: Debug in sgCommon ---------------
Running target post-build steps
cp --preserve=timestamps Bin/Debug//libsgCommon.a Bin/Debug//../Lib/libsgCommon.a
cp: Aufruf von stat für „Bin/Debug//libsgCommon.a“ nicht möglich: No such file or directory
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings
--- End quote ---
The article you mentioned is good. Everything is configured as described there. The wxWidgets settings don't help me, because I don't use wxWidgets in this project.
--- End quote ---
MinGW GCC does NOT produce .lib files; MSVC and other windows compilers produce .lib files.
Your post builds steps are not working; assume all relative paths are relative to project file location.
Tim S.
Samuel G.:
Jes, I forgot that this mechanism is called .a under gcc, not .lib. Sorry I have got confused about all this stuff.
So again: how to generate a .a as part of a DLL-Project?
It is just a pitty that there is no Project template for creating DLLs in Codeblocks for ubuntu. And I didn't find any documents on how to resemble the necessary settings by hand.
[of course my post build steps don't work, because they expect a .a file in the output]
stahta01:
The command used under Windows MinGW GCC DLL build.
--- Quote ---mingw32-g++.exe -shared -Wl,--output-def=bin\Debug\libTest.dll.def -Wl,--out-implib=bin\Debug\libTest.dll.a -Wl,--dll obj\Debug\main.o -o bin\Debug\Test.dll -luser32
Creating library file: bin\Debug\libTest.dll.a
--- End quote ---
NOTE: You really need to find a support site for your questions other than Code::Blocks Website; Your questions are compiler related in nearly all cases.
Tim S.
oBFusCATed:
--- Quote from: Samuel G. on June 18, 2010, 05:58:52 pm ---It is just a pitty that there is no Project template for creating DLLs in Codeblocks for ubuntu. And I didn't find any documents on how to resemble the necessary settings by hand.
--- End quote ---
What about the shared library template?
http://www.linuxforums.org/forum/coffee-lounge/37811-does-linux-use-dlls.html
--- Quote ---Yes linux does use dll's, however the name dll isn't a generic computer science term it's just what windows calls it, it's a function library and in linux they're called libraries and pretty much always have the postfix of .so.
--- End quote ---
Navigation
[0] Message Index
[*] Previous page
Go to full version