Attempting to build-compile ModelTool in Linux

Questions or HOWTOs about the above? Post 'em here...
Post Reply
User avatar
Zehra
Private First Class
Private First Class
Posts: 880
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Attempting to build-compile ModelTool in Linux

Post by Zehra »

I'm having trouble getting modeltool to compile. (This is from a 2.4.26. release)

Running the following command in a compiled/built BZFlag/BZFS directory:

Code: Select all

g++ -o modeltool modeltool.cxx  -I../../include ../../src/common/libCommon.a
Leads to the following:

Code: Select all

g++: error: ../../src/common/libCommon.a: No such file or directory
---
Doing the following command:

Code: Select all

g++ -o modeltool modeltool.cxx  -I../../include ../../src/common/libCommon.la
Leads to the following:

Code: Select all

../../src/common/libCommon.la: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
---
Doing the following:

Code: Select all

g++ -o modeltool modeltool.cxx  -I "../../include ../../src/common/libCommon.la"
Leads to the following:

Code: Select all

/usr/bin/ld: /tmp/cc957VDf.o: in function `main':
modeltool.cxx:(.text+0x19c6): undefined reference to `readOBJ(CModel&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/bin/ld: modeltool.cxx:(.text+0x1a2d): undefined reference to `Quake3Level::Quake3Level()'
/usr/bin/ld: modeltool.cxx:(.text+0x1a51): undefined reference to `Quake3Level::loadFromFile(char const*)'
/usr/bin/ld: modeltool.cxx:(.text+0x1a6a): undefined reference to `Quake3Level::dumpToModel(CModel&)'
/usr/bin/ld: modeltool.cxx:(.text+0x1a79): undefined reference to `Quake3Level::~Quake3Level()'
/usr/bin/ld: modeltool.cxx:(.text+0x1cb3): undefined reference to `Quake3Level::~Quake3Level()'
collect2: error: ld returned 1 exit status
---
Doing the following:

Code: Select all

g++ -o modeltool modeltool.cxx  -I ../../include ../../src/common/libCommon.la
Leads to the following:

Code: Select all

../../src/common/libCommon.la: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
However, while attempting to compile modeltool in a directory where BZFlag/BZFS is not compiled:
Leads to where the following error occurs:

Code: Select all

g++: error: ../../src/common/libCommon.a: No such file or directory
What would be the recommended in this case?

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
GEP
Private First Class
Private First Class
Posts: 17
Joined: Sun Jan 12, 2020 7:17 pm

Re: Attempting to build-compile ModelTool in Linux

Post by GEP »

While I don't understand why you're trying to use g++ to build Modeltool, its easier to just use `make` while in that directory.

Code: Select all

g++ -o modeltool modeltool.cxx -include SimpleTextUtils.h model.h wavefrontOBJ.h Q3BSP.h Q3BSP.cxx wavefrontOBJ.cxx SimpleTextUtils.cxx
Worked for me.
User avatar
Zehra
Private First Class
Private First Class
Posts: 880
Joined: Sun Oct 18, 2015 3:36 pm
Location: Arctic
Contact:

Re: Attempting to build-compile ModelTool in Linux

Post by Zehra »

Thanks GEP, it compiles wonderfully. (I'm not familiar with make/makefiles and couldn't save myself if my life if it depended on it, lol.)

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Post Reply