Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Using SDL on Cygwin + g++ Version 3


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Oisin   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 April 2011 - 01:13 PM

I am having some problems. Here are the steps I have followed:

1. Downloaded SDL-1.2.14 and extracted it into my main cygwin directory.
2. Changed my gcc to version 3 using: /usr/bin/set-gcc-default-3.sh
3. Run in the SDL directory: ./configure && make && install
4. Receive errors:

$ ./configure && make && make install
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for as... as
checking for dlltool... dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared
 libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether byte ordering is bigendian... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared
 libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared
 libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for windres... windres
checking for an ANSI C-conforming const... no
checking for inline... no
checking for working volatile... no
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking stdio.h usability... no
checking stdio.h presence... no
checking for stdio.h... no
checking for stdlib.h... (cached) yes
checking stddef.h usability... no
checking stddef.h presence... no
checking for stddef.h... no
checking stdarg.h usability... no
checking stdarg.h presence... no
checking for stdarg.h... no
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking for memory.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking ctype.h usability... no
checking ctype.h presence... no
checking for ctype.h... no
checking math.h usability... no
checking math.h presence... no
checking for math.h... no
checking iconv.h usability... no
checking iconv.h presence... no
checking for iconv.h... no
checking signal.h usability... no
checking signal.h presence... no
checking for signal.h... no
checking for size_t... no
checking for int64_t... no
checking for working memcmp... no
checking for working strtod... no
checking for pow... no
checking for pow in -lm... no
configure: WARNING: cannot find library containing definition of pow
checking for mprotect... no
checking for malloc... no
checking for calloc... no
checking for realloc... no
checking for free... no
checking for getenv... no
checking for putenv... no
checking for unsetenv... no
checking for qsort... no
checking for abs... no
checking for bcopy... no
checking for memset... no
checking for memcpy... no
checking for memmove... no
checking for strlen... no
checking for strlcpy... no
checking for strlcat... no
checking for strdup... no
checking for _strrev... no
checking for _strupr... no
checking for _strlwr... no
checking for strchr... no
checking for strrchr... no
checking for strstr... no
checking for itoa... no
checking for _ltoa... no
checking for _uitoa... no
checking for _ultoa... no
checking for strtol... no
checking for strtoul... no
checking for _i64toa... no
checking for _ui64toa... no
checking for strtoll... no
checking for strtoull... no
checking for atoi... no
checking for atof... no
checking for strcmp... no
checking for strncmp... no
checking for _stricmp... no
checking for strcasecmp... no
checking for _strnicmp... no
checking for strncasecmp... no
checking for sscanf... no
checking for snprintf... no
checking for vsnprintf... no
checking for iconv... no
checking for sigaction... no
checking for setjmp... no
checking for nanosleep... no
checking for libiconv_open in -liconv... no
checking for pow in -lm... (cached) no
checking Win32 compiler... no
configure: error:
*** Your compiler (gcc) does not produce Win32 executables!

Could anyone help me?

Sponsor:

#2 Oisin   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 April 2011 - 06:05 PM

I figured out my error but now I am receiving the following when I try to link SDL_image.dll:

cannot find -lSDL_image


Makefile:

rabbit: main.o rabbit.o renderer.o
g++ -o rabbit main.o rabbit.o renderer.o -lSDLmain -lSDL_image -lSDL

#3 nfries88   Members   -  Reputation: 259

Like
0Likes
Like

Posted 26 April 2011 - 08:17 PM

did you build and properly install SDL_image? SDL_image is not built from the same codebase or makefile as SDL.
Looking for paid or open-source C++ programming work. Been programming since 2005. No degree.

#4 Oisin   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 April 2011 - 08:47 PM

All I did was include SDL_image.dll and SDL_image.lib in my executable's directory, and place the SDL_image.h in the appropriate location.

#5 nfries88   Members   -  Reputation: 259

Like
1Likes
Like

Posted 27 April 2011 - 07:42 PM

try adding the location of SDL_image.lib to your project's "Additional Link Directories" (or equivalent) setting.
Looking for paid or open-source C++ programming work. Been programming since 2005. No degree.

#6 Oisin   Members   -  Reputation: 100

Like
0Likes
Like

Posted 29 April 2011 - 06:10 PM

That was the problem - I forgot to update this thread (I asked at StackOverflow as well).

Since I'm using command line, I added this to my Makefile:

-L/usr/local/lib




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS