|
|
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Use static library!
Use static library! [message #19753] |
Tue, 13 January 2009 14:33  |
|
Hello!
I have a project that based on: main exe file, static library (as dll), plugins (as dll)! The main executable file and plugins will use the static library!
When compiling in visual studio create .dll and .lib files and after than i can use this .lib file for compiling other plugins compile.
In u++ I found the method how can i use .lib files for plugins (Package organizer-libraries category) but not found how can I create .lib file.
What is be best solution? Help please!
|
|
|
|
|
Re: Use static library! [message #23541 is a reply to message #23538] |
Thu, 29 October 2009 16:05   |
 |
forlano
Messages: 1207 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
forlano wrote on Thu, 29 October 2009 13:40 |
forlano wrote on Thu, 29 October 2009 11:21 |
tojocky wrote on Tue, 13 January 2009 14:33 | In u++ I found the method how can i use .lib files for plugins (Package organizer-libraries category) but not found how can I create .lib file.
|
Hello,
I have the same problem. I have an application but I would like to obtain from it a static lib to be used in other programs.
Can this task be performed by theide or in some other way?
Thank you,
Luigi
|
I try to answer myself after a try.
I created a new package and in its definition I have included as package even my old application that I wanted to be a lib.
Then I compiled the new package that in turn compiled even my old application. As side effect of the compilation in the folder
C:\upp\out\myoldpackage\MSC9.Gui
I magically found a
myoldpackage.lib
It should be static lib I was looking for. Am I right?
Thank you,
Luigi
|
The answer seems to be "No". I got many undefined reference although I linked as usual (set the path in Build Methods, and added the lib in package organizer...
Linking...
c++ -static -mwindows -o "C:\upp20081\out\MINGW.Gui\testVegaserver.exe" -Wl,-s -L"C:\upp20081\mingw\lib" -L"C:\MyApps\testVegaserver" -Wl
,-O,2 "C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o" "C:/upp20081/out/CtrlLib/MINGW.Gui\CtrlLib.o" "C:/upp20081/out/CtrlCore
/MINGW.Gui\CtrlCore.o" "C:/upp20081/out/RichText/MINGW.Gui\RichImage.o" "C:/upp20081/out/plugin/bmp/MINGW.Gui\BmpReg.o" "C:/upp20081/
out/Web/MINGW.Gui\Web_init.o" "C:/upp20081/out/plugin/png/MINGW.Gui\pngreg.o" "C:/upp20081/out/plugin/jpg/MINGW.Gui\jpgreg.o" -Wl,--s
tart-group "C:/upp20081/out/CtrlLib/MINGW.Gui\CtrlLib.a" -ladvapi32 -lcomdlg32 -lcomctl32 "C:/upp20081/out/CtrlCore/MINGW.Gui\CtrlCo
re.a" "C:/upp20081/out/RichText/MINGW.Gui\RichText.a" -luser32 -lgdi32 "C:/upp20081/out/Draw/MINGW.Gui\Draw.a" "C:/upp20081/out/plugi
n/bmp/MINGW.Gui\bmp.a" -ladvapi32 -lshell32 -lwinmm -lmpr -lole32 -loleaut32 -luuid "C:/upp20081/out/Core/MINGW.Gui\Core.a" -lws2_32
"C:/upp20081/out/Web/MINGW.Gui\Web.a" "C:/upp20081/out/plugin/z/MINGW.Gui\z.a" "C:/upp20081/out/plugin/png/MINGW.Gui\png.a" "C:/upp20
081/out/plugin/jpg/MINGW.Gui\jpg.a" "C:\MyApps\testVegaserver\Vega5server.lib" -Wl,--end-group
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_GLOBAL__I_TD+0xf): undefined reference to `RoundData::RoundData()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_GLOBAL__I_TD+0x36): undefined reference to `PlayerArchive::PlayerAr
chive()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN18WithVegaTab4LayoutIN3Upp10ParentCtrlEED2Ev[Wit hVegaTab4Layout <U
pp::ParentCtrl>::~WithVegaTab4Layout()]+0x1d): undefined reference to `Upp::RichEdit::~RichEdit()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN18WithVegaTab4LayoutIN3Upp10ParentCtrlEED1Ev[Wit hVegaTab4Layout <U
pp::ParentCtrl>::~WithVegaTab4Layout()]+0x1d): undefined reference to `Upp::RichEdit::~RichEdit()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN8VegaTab3D1Ev[VegaTab3::~VegaTab3()]+0x20): undefined reference t
o `Upp::RichEdit::~RichEdit()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN3Upp10FontHeightD1Ev[Upp::FontHeight::~FontHeigh t()]+0x8): undefi
ned reference to `vtable for Upp::FontHeight'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN3Upp10FontHeightD1Ev[Upp::FontHeight::~FontHeigh t()]+0xf): undefi
ned reference to `vtable for Upp::FontHeight'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN3Upp10FontHeightD1Ev[Upp::FontHeight::~FontHeigh t()]+0x19): undef
ined reference to `vtable for Upp::FontHeight'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN18WithVegaTab4LayoutIN3Upp10ParentCtrlEED0Ev[Wit hVegaTab4Layout <U
pp::ParentCtrl>::~WithVegaTab4Layout()]+0x1d): undefined reference to `Upp::RichEdit::~RichEdit()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN8VegaTab3D0Ev[VegaTab3::~VegaTab3()]+0x20): undefined reference t
o `Upp::RichEdit::~RichEdit()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_ZN8VegaMainD1Ev[VegaMain::~VegaMain()]+0xe): undefined reference to
`vtable for VegaMain'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0x1a): undefined reference to `VegaMain::VegaMain()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0xa9): undefined reference to `VegaMain::ReadVegFile
(Upp::String)'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0x1f0): undefined reference to `RoundData::AdjournCr
ossTableSwiss(int)'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0x218): undefined reference to `RoundData::AdjournCr
ossTableRR(int)'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0x252): undefined reference to `VegaMain::DopairingC
B()'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0x2a2): undefined reference to `VegaMain::ReadVegFil
e(Upp::String)'
C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o:main.cp p:(.text$_Z10GuiMainFn_v+0x40a): undefined reference to `VegaMain::GetResultC
B(Upp::String)'
collect2: ld returned 1 exit status
C:\upp20081\mingw\bin\c++.exe -static -mwindows -o "C:\upp20081\out\MINGW.Gui\testVegaserver.exe" -Wl,-s -L"C:\upp20081\mingw\lib" -L"C:\
MyApps\testVegaserver" -Wl,-O,2 "C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o" "C:/upp20081/out/CtrlLib/MINGW.Gui\CtrlLib.o"
"C:/upp20081/out/CtrlCore/MINGW.Gui\CtrlCore.o" "C:/upp20081/out/RichText/MINGW.Gui\RichImage.o" "C:/upp20081/out/plugin/bmp/MINGW.G
ui\BmpReg.o" "C:/upp20081/out/Web/MINGW.Gui\Web_init.o" "C:/upp20081/out/plugin/png/MINGW.Gui\pngreg.o" "C:/upp20081/out/plugin/jpg/M
INGW.Gui\jpgreg.o" -Wl,--start-group "C:/upp20081/out/CtrlLib/MINGW.Gui\CtrlLib.a" -ladvapi32 -lcomdlg32 -lcomctl32 "C:/upp20081/out
/CtrlCore/MINGW.Gui\CtrlCore.a" "C:/upp20081/out/RichText/MINGW.Gui\RichText.a" -luser32 -lgdi32 "C:/upp20081/out/Draw/MINGW.Gui\Draw
.a" "C:/upp20081/out/plugin/bmp/MINGW.Gui\bmp.a" -ladvapi32 -lshell32 -lwinmm -lmpr -lole32 -loleaut32 -luuid "C:/upp20081/out/Core/M
INGW.Gui\Core.a" -lws2_32 "C:/upp20081/out/Web/MINGW.Gui\Web.a" "C:/upp20081/out/plugin/z/MINGW.Gui\z.a" "C:/upp20081/out/plugin/png/
MINGW.Gui\png.a" "C:/upp20081/out/plugin/jpg/MINGW.Gui\jpg.a" "C:\MyApps\testVegaserver\Vega5server.lib" -Wl,--end-group
Error executing C:\upp20081\mingw\bin\c++.exe -static -mwindows -o "C:\upp20081\out\MINGW.Gui\testVegaserver.exe" -Wl,-s -L"C:\upp20081\m
ingw\lib" -L"C:\MyApps\testVegaserver" -Wl,-O,2 "C:/upp20081/out/testVegaserver/MINGW.Gui.Main\main.o" "C:/upp20081/out/CtrlLib/MING
W.Gui\CtrlLib.o" "C:/upp20081/out/CtrlCore/MINGW.Gui\CtrlCore.o" "C:/upp20081/out/RichText/MINGW.Gui\RichImage.o" "C:/upp20081/out/pl
ugin/bmp/MINGW.Gui\BmpReg.o" "C:/upp20081/out/Web/MINGW.Gui\Web_init.o" "C:/upp20081/out/plugin/png/MINGW.Gui\pngreg.o" "C:/upp20081/
out/plugin/jpg/MINGW.Gui\jpgreg.o" -Wl,--start-group "C:/upp20081/out/CtrlLib/MINGW.Gui\CtrlLib.a" -ladvapi32 -lcomdlg32 -lcomctl32
"C:/upp20081/out/CtrlCore/MINGW.Gui\CtrlCore.a" "C:/upp20081/out/RichText/MINGW.Gui\RichText.a" -luser32 -lgdi32 "C:/upp20081/out/Dra
w/MINGW.Gui\Draw.a" "C:/upp20081/out/plugin/bmp/MINGW.Gui\bmp.a" -ladvapi32 -lshell32 -lwinmm -lmpr -lole32 -loleaut32 -luuid "C:/upp
20081/out/Core/MINGW.Gui\Core.a" -lws2_32 "C:/upp20081/out/Web/MINGW.Gui\Web.a" "C:/upp20081/out/plugin/z/MINGW.Gui\z.a" "C:/upp20081
/out/plugin/png/MINGW.Gui\png.a" "C:/upp20081/out/plugin/jpg/MINGW.Gui\jpg.a" "C:\MyApps\testVegaserver\Vega5server.lib" -Wl,--end-gr
oup
[Updated on: Thu, 29 October 2009 16:40] Report message to a moderator
|
|
|
|
Re: Use static library! [message #58649 is a reply to message #23543] |
Sat, 09 July 2022 21:24  |
ecapuano
Messages: 12 Registered: December 2021 Location: Mexico
|
Promising Member |
|
|
Hi forlano, did you ever make it to work?, if so, would you please let me know know, i successfully make it to work but not statically, i created the dll in one package and used Dl.load and works but only when lauching form theIde, it does not find the file in standalone even the path is correct, so i want to go back to the static strategy hehe
|
|
|
Goto Forum:
Current Time: Fri Apr 25 19:02:00 CEST 2025
Total time taken to generate the page: 0.00751 seconds
|
|
|