blackberry / DosBox

DosBox is a MS-DOS emulator used to play older games and applications meant to run on DOS.
GNU General Public License v2.0
59 stars 18 forks source link

Cannot compile #5

Open ssshake opened 12 years ago

ssshake commented 12 years ago

I've followed these instructions, which seem pretty simple. But when I compile it says, "..\src\dos\/cdrom.h:20:23: error: SDL_sound.h: No such file or directory"

Build Instructions

  1. Download SDL_sound from http://icculus.org/SDL_sound/downloads/.
  2. Extract the files into the src subdirectory in this folder.
  3. Import the NDK project in this directory into your NDK workspace, it should create a project called SDL_sound.
  4. Build the project.

My take on the above instructions are:

1) Add dosbox to NDK via git 2) Download sdl_sound 1.0.3 and extract it to 3rdparty/SDL_sound/src under the doxbox project directory 3) Import it to existing workspace? I have no found an option that creates a project called SDL_sound. I can't get that step to occur.

jnicholl commented 12 years ago

If you open the NDK, there should be an "Import" option in the File menu. I believe the option is to import "Existing Projects into Workspace". Let me know if you can't find it.

-----Original Message----- From: ssshake [mailto:reply@reply.github.com] Sent: Tuesday, April 24, 2012 3:20 PM To: Jeremy Nicholl Subject: [DosBox] Cannot compile (#5)

I've followed these instructions, which seem pretty simple. But when I compile it says, "..\src\dos\/cdrom.h:20:23: error: SDL_sound.h: No such file or directory"

Build Instructions

  1. Download SDL_sound from http://icculus.org/SDL_sound/downloads/.
  2. Extract the files into the src subdirectory in this folder.
  3. Import the NDK project in this directory into your NDK workspace, it should create a project called SDL_sound.
  4. Build the project.

My take on the above instructions are:

1) Add dosbox to NDK via git 2) Download sdl_sound 1.0.3 and extract it to 3rdparty/SDL_sound/src under the doxbox project directory 3) Import it to existing workspace? I have no found an option that creates a project called SDL_sound. I can't get that step to occur.


Reply to this email directly or view it on GitHub: https://github.com/blackberry/DosBox/issues/5


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

ssshake commented 12 years ago

Thanks for the quick response. This wasn't the process I was using, but I tried it too against SDL_sound-1.0.3.tar.gz archive and it says no projects are found to import. The posted instructions are a bit misleading as to what to expect.

Let me review what I've tried.

1) Add dosbox to NDK via git - this gives me a "doxbox [DosBos master]" project in Momentics 2) Download SDL_sounds-1.0.3.tar.gz from site listed (appears offline right now??) 3) Extract tar.gz to c:...\workspace\dosbox\3rdpart\SDL_sound\src. To be clear beneath src folder it has subdirs such as decoders, docs and files like SDL_sound.h

4) From here I've tried the following. a) File > Import > Archive > tar.gz file into workspace dosbox b) File > Import > File system > extracted files under src into doxbox c) Your suggestion of existing projects into workspace (was I supposed to create a project in momentics for SDL_sound first? If so how, as I've already tried to make a separate project for SDL_sound without success)

The instructions say "it should create a project called SDL_sound." So am I to literally expect a project named SDL_sound in my main hierarchy of momentics? I dont understand at which point this project is supposedly created.

Thanks

ssshake commented 12 years ago

I manually set the path of the library and I get further but now I'm stuck at this

-IC:\Development\git\git\SDL\include -IC:\Development\git\git\DosBox\3rdparty\SDL_sound\src -DQNXNTO -DPLAYBOOK -c -g

cc1plus: out of memory allocating 65536 bytes

I'm not an expert at this stuff so it might be above my head. Trying to learn as I go. Seems to me like I would set this malloc higher but should I even have to. Is it a cause or a symptom in other words.

ssshake commented 12 years ago

To be inclusive of my steps before I got the allocation error I previously got this

..\src\dos\cdrom_image.cpp:95: error: 'Sound_Seek' was not declared in this scope ..\src\dos\cdrom_image.cpp: In member function 'virtual int CDROM_Interface_Image::AudioFile::getLength()': ..\src\dos\cdrom_image.cpp:114: error: 'SOUND_SAMPLEFLAG_CANSEEK' was not declared in this scope ..\src\dos\cdrom_image.cpp:117: error: 'Sound_Seek' was not declared in this scope cc: C:/development/bbndk-2.0.0/host/win32/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/cc1plus caught signal 1 Build error occurred, build is stopped Time consumed: 7375 ms.

As such I commented out this (not knowing what I'm doing) to see what would happen if I got rid of that error: //int success = Sound_Seek(sample, (int)((double)(seek) / 176.4f));

asimonov-im commented 12 years ago

Hang on a minute! :) I have a reply, but I haven't finished typing it yet!

asimonov-im commented 12 years ago

Inside the https://github.com/blackberry/DosBox/tree/master/3rdparty/SDL_sound directory, which should be part of your Dosbox checkout, there are project files for SDL_sound. If you extract the contents of the .tar.gz file that you downloaded into that directory, then you should be able to import a project into the NDK from that directory.

Sorry for the confusion. Is that any more clear?

asimonov-im commented 12 years ago

I don't know what the malloc issue is, I suspect it's not a real problem but just a symptom of the compiler not knowing what files to look at (for example, if it was trying to open a zip file as a source file, or something).

asimonov-im commented 12 years ago

What directory did it search when it looked for projects to import? It does not search recursively (unfortunately) so you may have to direct it into the 3rdparty/SDL_sound directory to find the project.

ssshake commented 12 years ago

Thanks that almost worked. See below. Could have swore tried this over the weekend but hard to recall. Here's my dir for reference.

here's my structure:

Directory of C:\Development\git\git\DosBox\3rdparty\SDL_sound [.] [..] .cproject .project README [src]

Directory of C:\Development\git\git\DosBox\3rdparty\SDL_sound\src

[.] [..] acconfig.h acinclude.m4 aclocal.m4 audio_convert.c CHANGELOG config.guess config.h.in config.sub configure configure.in COPYING CREDITS CWProject.sit [decoders] depcomp extra_rwops.c extra_rwops.h INSTALL install-sh ltconfig ltmain.sh Makefile.am Makefile.in missing mkinstalldirs placeholder [playsound] README SDL_sound.c SDL_sound.h SDL_sound_internal.h stamp-h.in TODO

Anyway I go file > import > existing project I choose C:\Development\git\git\DosBox\3rdparty\SDL_sound It does find the project now (i was going to the src dir before d'oh) I import it and it shows up as a new project. And guess what, it compiles.

But when I build dosbox it fails here:

-IC:\Development\git\git\SDL\include -IC:\Development\git\git\DosBox\3rdparty\SDL_sound\src -DQNXNTO -DPLAYBOOK -c -g

cc1plus: out of memory allocating 20479 bytes

Perhaps I should try from scratch again to be safe unless you think it's something obvious.

jnicholl commented 12 years ago

Can you copy more of the command line? What is shown there is only part of a line.

-----Original Message----- From: ssshake [mailto:reply@reply.github.com] Sent: Tuesday, April 24, 2012 4:03 PM To: Jeremy Nicholl Subject: Re: [DosBox] Cannot compile (#5)

Thanks that almost worked. See below. Could have swore tried this over the weekend but hard to recall. Here's my dir for reference.

here's my structure:

Directory of C:\Development\git\git\DosBox\3rdparty\SDL_sound [.] [..] .cproject .project README [src]

Directory of C:\Development\git\git\DosBox\3rdparty\SDL_sound\src

[.] [..] acconfig.h acinclude.m4 aclocal.m4 audio_convert.c CHANGELOG config.guess config.h.in config.sub configure configure.in COPYING CREDITS CWProject.sit [decoders] depcomp extra_rwops.c extra_rwops.h INSTALL install-sh ltconfig ltmain.sh Makefile.am Makefile.in missing mkinstalldirs placeholder [playsound] README SDL_sound.c SDL_sound.h SDL_sound_internal.h stamp-h.in TODO

Anyway I go file > import > existing project I choose C:\Development\git\git\DosBox\3rdparty\SDL_sound It does find the project now (i was going to the src dir before d'oh) I import it and it shows up as a new project. And guess what, it compiles.

But when I build dosbox it fails here:

-IC:\Development\git\git\SDL\include -IC:\Development\git\git\DosBox\3rdparty\SDL_sound\src -DQNXNTO -DPLAYBOOK -c -g

cc1plus: out of memory allocating 20479 bytes

Perhaps I should try from scratch again to be safe unless you think it's something obvious.


Reply to this email directly or view it on GitHub: https://github.com/blackberry/DosBox/issues/5#issuecomment-5316094


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

ssshake commented 12 years ago

I was just outputting the contents of SDL_sound so you could see whether I'm doing something incredibly wrong. Because this site: http://icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz is unresponsive I had to get sdl_sound_1.0.3 from another source.