Need help compiling on ubuntu

Questions or HOWTOs about the above? Post 'em here...
Post Reply
fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Need help compiling on ubuntu

Post by fury » Thu Jan 03, 2008 3:11 am

Code: Select all

std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&, int&) const':
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:414: undefined reference to `openWavFile(char const*, short*, long*, int*, short*, short*)'
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:418: undefined reference to `readWavData(_IO_FILE*, char*, int, int)'
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:424: undefined reference to `closeWavFile(_IO_FILE*)'
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:421: undefined reference to `closeWavFile(_IO_FILE*)'
collect2: ld returned 1 exit status
make[2]: *** [bzflag] Erro[/quote]r 1
make[2]: Leaving directory `/home/christina/Desktop/bzflag-2.0.10/src/bzflag'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/christina/Desktop/bzflag-2.0.10/src'
make: *** [all-recursive] Error 1
I did "make", and that's what I got. I dunno what to do about it. Help? :?

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Thu Jan 03, 2008 6:12 am

It would help if you could post the entire output (in an attachment, please) so we can see it in full detail. From the looks of things, I'm guessing there's one or more development libraries (headers) missing.

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Thu Jan 03, 2008 9:34 pm

Okay. Here's my compiling thing.
Attachments
compilingerror.txt
(54 KiB) Downloaded 111 times

User avatar
Macrosoft
Private First Class
Private First Class
Posts: 142
Joined: Fri May 04, 2007 2:21 am

Post by Macrosoft » Fri Jan 04, 2008 2:05 am

try installing the libsdl1.2-dev package. you can get it through a terminal window by running "sudo apt-get install libsdl1.2-dev" without the quotes.
it will tell you if you already have it installed.
gazz: A bullet may have your name on it, but shrapnel is addressed "to whom it may concern".
http://bash.org/?785529

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Fri Jan 04, 2008 2:09 am

Already have it.

F687/s
Private First Class
Private First Class
Posts: 369
Joined: Sun Dec 31, 2006 8:30 pm

Post by F687/s » Fri Jan 04, 2008 2:37 am

> try installing the libsdl1.2-dev package.

As far as I know, libsdl1.2-dev only includes the bare-bones SDL dev files. You may need to install the other SDL dev packages (libsdl-sound1.2-dev, libsdl-mixer1.2-dev ?) in order for it to work.

Also, the bzflag source (wave.cxx) defines an openWavFile, so maybe your libs aren't working correctly.

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Fri Jan 04, 2008 3:08 am

Code: Select all

 file = openWavFile(filename.c_str(), &format, &speed, &numFrames, &channels, &width);
  if (!file) return 0;
  rate=speed;
  rawdata=new char[numFrames*width*channels];
  if (readWavData(file, rawdata, numFrames*channels, width)) {
    fprintf(stderr, "Failed to read the wav data\n");
    delete [] rawdata;
    closeWavFile(file);
    return 0;
  }
  closeWavFile(file);
I removed that from BzfMedia.cxx and it compiled all the way through, but now it's not making any runnable files. >_>

User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak » Fri Jan 04, 2008 3:47 am

It shouldn't be building that at all, it's only supposed to be compiled without HAVE_SDL defined. When we have SDL, we use SDL to load wave files without using our own code. Try running configure again.

anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly » Fri Jan 04, 2008 5:31 pm

If running configure again does not work...

Some distros have separate SDL libs and headers for sound, image, etc. The configure.ac file does not include a check for SDL sound specifically. Check to make sure you have SDL sound libs and devel packages. Or try using your package manager to install them. You don't have SDL_image either. You should get that too. You obviously have SDL because sdl-config worked. But it does not appear that you have the SDL devel packages (header files).

Also you shouldn't need to be root to build bzflag. Just to install. Unless you're installing in your home directory.

F687/s
Private First Class
Private First Class
Posts: 369
Joined: Sun Dec 31, 2006 8:30 pm

Post by F687/s » Sat Jan 05, 2008 12:14 am

> I removed that from BzfMedia.cxx and it compiled all the way through, but now it's not making any runnable files. >_>

By removing that (which I hope you just commented it out), it should still be able to compile and run, just not play .wav files. What error do you get if you try to run it?

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Sat Jan 05, 2008 4:02 am

Nothing, there is actually no file to run.

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Sat Jan 05, 2008 6:45 am

Fury wrote:Nothing, there is actually no file to run.
The actual compiled binaries are installed by the "make install" command. If your build process completed successfully, there should be a binary at <source>/src/bzflag/bzflag. If it did not complete successfully, it should've given some sort of error.

User avatar
blast
General
General
Posts: 4751
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast » Sat Jan 05, 2008 7:09 am

Before a 'make install', the binary files will be in the following locations:
./src/bzfs/bzfs
./src/bzflag/bzflag
./src/bzadmin/bzadmin
(assuming they're all set to build)
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Sat Jan 05, 2008 10:30 pm

Okay, I got a working program, but it can't connect to any servers. I can see the server list, though.

User avatar
blast
General
General
Posts: 4751
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast » Sun Jan 06, 2008 3:14 am

What error do you get?
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Sun Jan 06, 2008 3:22 am

"Server not found"

fury
Private First Class
Private First Class
Posts: 14
Joined: Sat Jul 07, 2007 3:37 am

Post by fury » Mon Jan 07, 2008 6:36 am

I did it in debug mode, and it said..

bzflag: /usr/local/lib/libcurl.so.4: no version information available (required by bzflag)
BZFlag version: 2.0.10.20080106-MAINT-linux-gnu-SDL
BZFlag protocol: 0026
OpenGL vendor: NVIDIA Corporation
OpenGL version: 2.1.0 NVIDIA 96.39
OpenGL renderer: GeForce FX 5200/AGP/SSE/3DNOW!
Depth Buffer: 24 bitplanes
LIBCURL version: libcurl/7.17.1 zlib/1.2.3.3
Player [0] failed to resolve: error 11
Player [0] failed to resolve: error 11

Post Reply