Kompilacja biblioteki na windows

0

Witam, chce skompilowac ta biblioteke na windowsa: http://sourceforge.net/p/pdcurses/code/ci/master/tree/ <--- Wiem ze jest tam dokumentacja jak kompilowac ale nie rozumiem jednej rzeczy.
Mam te zrodla i teraz po kompilacji biblioteki kompiluje tez binarki testowe zeby zaprezentowac dzialanie owej biblioteki, ale jak kompiluje to wychodza mi binarki na linuxa, jak moge zrobic zeby wyszly mi .exe windowsowe ?
Chodzi mi glownie o to zeby ta biblioteka w folderze "sdl1" zostala skompilowana i po kompilacji zeby byly tam pliki .exe to testowania, uzywam mingwa, gdy wedle dokumentacji wydaje w folderze sdl1 komende :

make -f Makefile.mng 

output wyglada nastepujaco:

gcc -O2 -Wall -I.. -o testcurs.exe ../demos/testcurs.c -mwindows libpdcurses.a -lSDL
gcc: error: unrecognized command line option ‘-mwindows’
Makefile.mng:93: polecenia dla obiektu 'testcurs.exe' nie powiodły się
make: *** [testcurs.exe] Błąd 1

Chcialbym po prostu przy uzyciu mingwa to skompilowac na windowsa.

0

ale jak kompiluje to wychodza mi binarki na linuxa, jak moge zrobic zeby wyszly mi .exe windowsowe

a kompilujesz pod Windowsem?

odpuść sobie cross-kompilację, szkoda zachodu.

0

Nie, kompiluje pod linuxem, i nie chce odpuszczac sobie cross-kompilacji bo chce to skompilowac w ten sposob, wiem ze to bedzie gorzej ale nic, moj znajomy wczoraj skompilowal ta biblioteke na windowsa na linuxie , tylko nie mam jak go zapytac na razie ale na pewno sie da, tylko tutaj chcialbym zapytac jak

0

Poza tym że makefile musiałem poprawić, to pod Windowsem nie widzę problemu..

Azarien@toshiba MINGW32 /c/svn
$ git clone git://git.code.sf.net/p/pdcurses/code pdcurses
Cloning into 'pdcurses'...
remote: Counting objects: 13391, done.
remote: Compressing objects: 100% (2534/2534), done.
remote: Total 13391 (delta 10870), reused 13352 (delta 10835)
Receiving objects: 100% (13391/13391), 2.74 MiB | 186.00 KiB/s, done.
Resolving deltas: 100% (10870/10870), done.
Checking connectivity... done.

Azarien@toshiba MINGW32 /c/svn
$ cd pdcurses/win32

Azarien@toshiba MINGW32 /c/svn/pdcurses/win32 (master)
$ vi mingwin32.mak

Azarien@toshiba MINGW32 /c/svn/pdcurses/win32 (master)
$ git diff
diff --git a/win32/mingwin32.mak b/win32/mingwin32.mak
index 7fb17e8..eaffd8e 100644
--- a/win32/mingwin32.mak
+++ b/win32/mingwin32.mak
@@ -70,9 +70,9 @@ all:  libs demos
 libs:  $(LIBCURSES)

 clean:
-       -del *.o
-       -del *.exe
-       -del $(CLEAN)
+       rm *.o
+       rm *.exe
+       rm $(CLEAN)

 demos: $(DEMOS)
        strip *.exe
@@ -87,7 +87,7 @@ endif

 $(LIBCURSES) : $(LIBDEPS)
        $(LIBEXE) $(LIBFLAGS) $@ $?
-       -copy pdcurses.a panel.a
+       cp pdcurses.a panel.a

 $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
 $(PDCOBJS) : $(PDCURSES_WIN_H)

Azarien@toshiba MINGW32 /c/svn/pdcurses/win32 (master)
$ mingw32-make -f mingwin32.mak

****CIACH****

Azarien@toshiba MINGW32 /c/svn/pdcurses/win32 (master)
$ ls *.a
panel.a  pdcurses.a

Azarien@toshiba MINGW32 /c/svn/pdcurses/win32 (master)
$ ls *.exe
firework.exe*  ptest.exe*  testcurs.exe*  worm.exe*
newdemo.exe*   rain.exe*   tuidemo.exe*   xmas.exe*

utrudniasz sobie życie.

wiem ze to bedzie gorzej ale nic

Nie gorzej tylko trudniej, u ciebie odpala się linuksowy gcc a potrzebny jest specjalny, generujący exeki pod windowsa.

0

to znaczy ja zamienilem swoj plik na taki:

# GNU MAKE Makefile for PDCurses library - WIN32 Cygnus GCC
#
# Usage: make -f [path\]gccwin32.mak [DEBUG=Y] [DLL=Y] [WIDE=Y] [UTF8=Y] [tgt]
#
# where tgt can be any of:
# [all|demos|pdcurses.a|testcurs.exe...]

O = o

ifndef PDCURSES_SRCDIR
	PDCURSES_SRCDIR = ..
endif

include $(PDCURSES_SRCDIR)/version.mif
include $(PDCURSES_SRCDIR)/libobjs.mif

osdir		= $(PDCURSES_SRCDIR)/win32

PDCURSES_WIN_H	= $(osdir)/pdcwin.h

CC		=  x86_64-w64-mingw32-gcc

ifeq ($(DEBUG),Y)
	CFLAGS  = -g -Wall -DPDCDEBUG
	LDFLAGS = -g
else
	CFLAGS  = -O2 -Wall
	LDFLAGS =
endif

CFLAGS += -I$(PDCURSES_SRCDIR)

BASEDEF		= $(PDCURSES_SRCDIR)/exp-base.def
WIDEDEF		= $(PDCURSES_SRCDIR)/exp-wide.def

DEFDEPS		= $(BASEDEF)

ifeq ($(WIDE),Y)
	CFLAGS += -DPDC_WIDE
	DEFDEPS += $(WIDEDEF)
endif

ifeq ($(UTF8),Y)
	CFLAGS += -DPDC_FORCE_UTF8
endif

DEFFILE		= pdcurses.def

LINK		=  x86_64-w64-mingw32-gcc


ifeq ($(DLL),Y)
	CFLAGS += -DPDC_DLL_BUILD
	LIBEXE =  x86_64-w64-mingw32-gcc $(DEFFILE)
	LIBFLAGS = -Wl,--out-implib,pdcurses.a -shared -o
	LIBCURSES = pdcurses.dll
	LIBDEPS = $(LIBOBJS) $(PDCOBJS) $(DEFFILE)
	CLEAN = $(LIBCURSES) *.a $(DEFFILE)
else
	LIBEXE =  x86_64-w64-mingw32-ar
	LIBFLAGS = rcv
	LIBCURSES = libpdcurses.a
	LIBDEPS = $(LIBOBJS) $(PDCOBJS)
	CLEAN = *.a
endif

.PHONY: all libs clean demos dist

all:	libs demos

libs:	$(LIBCURSES)

clean:
	-rm -f *.o
	-rm -f *.exe
	-rm -f $(CLEAN)

demos:	$(DEMOS)
	strip *.exe

$(DEFFILE): $(DEFDEPS)
	echo LIBRARY pdcurses > $@
	echo EXPORTS >> $@
	cat $(BASEDEF) >> $@
ifeq ($(WIDE),Y)
	cat $(WIDEDEF) >> $@
endif

$(LIBCURSES) : $(LIBDEPS)
	$(LIBEXE) $(LIBFLAGS) $@ $?
	-cp pdcurses.a panel.a

$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_WIN_H)
$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
panel.o : $(PANEL_HEADER)
terminfo.o: $(TERM_HEADER)

$(LIBOBJS) : %.o: $(srcdir)/%.c
	$(CC) -c $(CFLAGS) $<

$(PDCOBJS) : %.o: $(osdir)/%.c
	$(CC) -c $(CFLAGS) $<

firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \
ptest.exe: %.exe: $(demodir)/%.c
	$(CC) $(CFLAGS) -o$@ $< $(LIBCURSES)

tuidemo.exe: tuidemo.o tui.o
	$(LINK) $(LDFLAGS) -o$@ tuidemo.o tui.o $(LIBCURSES)

tui.o: $(demodir)/tui.c $(demodir)/tui.h $(PDCURSES_CURSES_H)
	$(CC) -c $(CFLAGS) -I$(demodir) -o$@ $<

tuidemo.o: $(demodir)/tuidemo.c $(PDCURSES_CURSES_H)
	$(CC) -c $(CFLAGS) -I$(demodir) -o$@ $<

dist: $(PDCLIBS)
	echo PDCurses $(VERDOT) for Cygnus Win32 > file_id.diz
	echo ------------------------------------------ >> file_id.diz
	echo Public Domain Curses library for >> file_id.diz
	echo Cygnus GCC for Win32. >> file_id.diz
	echo Source available in PDCURS$(VER).ZIP >> file_id.diz
	echo Public Domain. >> file_id.diz
	zip -9jX pdc$(VER)_cyg_w32 \
	$(PDCURSES_SRCDIR)/README $(PDCURSES_SRCDIR)/HISTORY \
	$(PDCURSES_SRCDIR)/curses.h $(PDCURSES_SRCDIR)/panel.h \
	$(LIBCURSES) $(LIBPANEL) file_id.diz
	rm file_id.diz

podmienilem moj gcc na te z mingwem, ale ciagle wyskakuje mi taki error jak tam pokazalem w 1 poscie

0

czy x86_64-w64-mingw32-gcc -mwindows też daje błąd "unrecognized command line option"?

w pierwszym poście widać że odpala się gcc a nie x86_64-w64-mingw32-gcc.

0

teraz mam taki:

gcc -O2 -Wall -I.. -c ../sdl1/pdcclip.c
In file included from ../sdl1/pdcclip.c:3:0:
../sdl1/pdcsdl.h:5:17: fatal error: SDL.h: Nie ma takiego pliku ani katalogu
compilation terminated.
Makefile.mng:89: polecenia dla obiektu 'pdcclip.o' nie powiodły się
make: *** [pdcclip.o] Błąd 1
0

nie potrzebne ci sdl, jest makefile odpowiedni w katalogu win32.

0

Jak niepotrzebne mi sdl ? Przeciez ja chce skompilowac te pliki ktore uzywaja sdl, ja chce skompilowac katalog sdl1 wlasnie tylko zeby te pliki z sdl dzialaly na windowsie, tamte .exe ktore mi wychodza w folderze win32 to aplikacje konsolowe a ja chce okienkowa uzywajaca sdl, zeby biblioteki i programy z folderu "sdl1" skompilowaly mi w wersje na windowsa. Jakis pomysl na to ?

0

Mam ta biblioteke, zainstalowalem ja do /usr/i686-w64-mingw32-gcc i teraz ciagle ten sam problem, co zrobic ? probuje uzyc i686-w64-mingw32-gcc Makefile.mng tam ale tez nic, nie wiem jak to teraz skompilowac, biblioteke mam

0

kompilator musi widzieć pliki .h a linker musi widzieć pliki .a.
można je "gdzieś tam" zainstalować tam gdzie trzeba, ale najprościej będzie wrzucić je do katalogu w którym jest projekt.

probuje uzyc i686-w64-mingw32-gcc Makefile.mng

próbujesz skompilować makefile'a?

0

mam te pliki w tym katalogu gdzie to jest ale co teraz ? Zobacz na ten makefile tam, on uzywa gcc, okej wrzucilem wszystkie pliki .a i .h i .dll tam co teraz ?

0

Najpierw dowiedz się jak używa się kroskompilatora i kompilatora. Jak się umie robic ./configure i make to nie jest się jeszcze super developerem, tu trzeba mieć trochę większą wiedzę.

0

dobrze w Makefile dalem "CC = x86_64-w64-mingw32-gcc"
ale teraz mam taki output z make'a

make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdcclip.c
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdcdisp.c
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdcgetsc.c
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdckbd.c
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdcscrn.c
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdcsetsc.c
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -DHAVE_VSNPRINTF -DHAVE_VSSCANF -c ../sdl1/pdcutil.c
ar rv libpdcurses.a addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o clear.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o inch.o inchstr.o initscr.o inopts.o insch.o insstr.o instr.o kernel.o keyname.o mouse.o move.o outopts.o overlay.o pad.o panel.o printw.o refresh.o scanw.o scr_dump.o scroll.o slk.o termattr.o terminfo.o touch.o util.o window.o debug.o pdcclip.o pdcdisp.o pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o pdcutil.o
ar: creating libpdcurses.a
a - addch.o
a - addchstr.o
a - addstr.o
a - attr.o
a - beep.o
a - bkgd.o
a - border.o
a - clear.o
a - color.o
a - delch.o
a - deleteln.o
a - deprec.o
a - getch.o
a - getstr.o
a - getyx.o
a - inch.o
a - inchstr.o
a - initscr.o
a - inopts.o
a - insch.o
a - insstr.o
a - instr.o
a - kernel.o
a - keyname.o
a - mouse.o
a - move.o
a - outopts.o
a - overlay.o
a - pad.o
a - panel.o
a - printw.o
a - refresh.o
a - scanw.o
a - scr_dump.o
a - scroll.o
a - slk.o
a - termattr.o
a - terminfo.o
a - touch.o
a - util.o
a - window.o
a - debug.o
a - pdcclip.o
a - pdcdisp.o
a - pdcgetsc.o
a - pdckbd.o
a - pdcscrn.o
a - pdcsetsc.o
a - pdcutil.o
ranlib libpdcurses.a
make: sdl-config: Polecenie nie znalezione
x86_64-w64-mingw32-gcc -O2 -Wall -I..  -o firework ../demos/firework.c libpdcurses.a 
libpdcurses.a: error adding symbols: Archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
Makefile:73: polecenia dla obiektu 'firework' nie powiodły się
make: *** [firework] Błąd 1
0

to Makefile.mng

# Makefile for PDCurses library for SDL

O = o

ifndef PDCURSES_SRCDIR
	PDCURSES_SRCDIR	= ..
endif

include $(PDCURSES_SRCDIR)/libobjs.mif

osdir		= $(PDCURSES_SRCDIR)/sdl1

PDCURSES_SDL_H	= $(osdir)/pdcsdl.h

ifeq ($(DEBUG),Y)
        CFLAGS  = -g -Wall -DPDCDEBUG
else
        CFLAGS  = -O2 -Wall
endif

CC		= gcc
BUILD		= $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR)
LDFLAGS		= -mwindows $(LIBCURSES)

BASEDEF		= $(PDCURSES_SRCDIR)\exp-base.def

DEFDEPS		= $(BASEDEF)

DEFFILE		= pdcurses.def

ifeq ($(DLL),Y)
	BUILD += -DPDC_DLL_BUILD
	LIBEXE = gcc $(DEFFILE)
	LIBFLAGS = -Wl,--out-implib,libpdcurses.a -shared -o
	LIBCURSES = pdcurses.dll
	CLEAN = $(LIBCURSES) *.a $(DEFFILE)
	POST = -lSDL
else
	LIBEXE = ar
	LIBFLAGS = rcv
	LIBCURSES = libpdcurses.a
	CLEAN = *.a
	LDFLAGS += -lSDL
endif

DEMOS += sdltest.exe

.PHONY: all libs clean demos

all:	libs demos

libs:	$(LIBCURSES)

clean:
	-del *.o $(CLEAN) *.exe

demos:	$(DEMOS)
	strip *.exe

pdcurses.dll: $(DEFFILE)

$(DEFFILE): $(DEFDEPS)
	echo LIBRARY pdcurses > $@        
	echo EXPORTS >> $@        
	type $(BASEDEF) >> $@ 
	echo pdc_screen >> $@
	echo pdc_font >> $@
	echo pdc_icon >> $@
	echo pdc_back >> $@
	echo pdc_sheight >> $@
	echo pdc_swidth >> $@
	echo pdc_yoffset >> $@
	echo pdc_xoffset >> $@

$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
	$(LIBEXE) $(LIBFLAGS) $@ $? $(POST)

$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_SDL_H)
$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
tui.o tuidemo.o : $(PDCURSES_CURSES_H)
terminfo.o: $(TERM_HEADER)
panel.o ptest.exe: $(PANEL_HEADER)

$(LIBOBJS) : %.o: $(srcdir)/%.c
	$(BUILD) -c $<

$(PDCOBJS) : %.o: $(osdir)/%.c
	$(BUILD) -c $<

firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \
ptest.exe: %.exe: $(demodir)/%.c
	$(BUILD) -o $@ $< $(LDFLAGS)

tuidemo.exe: tuidemo.o tui.o
	$(CC) -o $@ tuidemo.o tui.o $(LDFLAGS)

tui.o: $(demodir)/tui.c $(demodir)/tui.h
	$(BUILD) -c $<

tuidemo.o: $(demodir)/tuidemo.c $(demodir)/tui.h
	$(BUILD) -c $<

sdltest.exe: $(osdir)/sdltest.c
	$(BUILD) -o $@ $< -mwindows $(LIBCURSES) -lmingw32 -lSDLmain -lSDL

a to zwykle Makefile

# Makefile for PDCurses library for SDL

O = o

ifndef PDCURSES_SRCDIR
	PDCURSES_SRCDIR	= ..
endif

include $(PDCURSES_SRCDIR)/libobjs.mif

osdir		= $(PDCURSES_SRCDIR)/sdl1

PDCURSES_SDL_H	= $(osdir)/pdcsdl.h

SFLAGS		= $(shell sdl-config --cflags)
SLIBS		= $(shell sdl-config --libs)

# If your system doesn't have these, remove the defines here
SFLAGS		+= -DHAVE_VSNPRINTF -DHAVE_VSSCANF

ifeq ($(DEBUG),Y)
	CFLAGS  = -g -Wall -DPDCDEBUG
else
	CFLAGS  = -O2 -Wall
endif

BUILD		= $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR)

ifeq ($(shell uname),Darwin)
	DEMOFLAGS = -Dmain=SDL_main
endif

LINK		= $(CC)
LDFLAGS		= $(LIBCURSES) $(SLIBS)
RANLIB		= ranlib
LIBCURSES	= libpdcurses.a

DEMOS		= firework newdemo ptest rain testcurs tuidemo worm xmas \
sdltest

.PHONY: all libs clean demos

all:	libs demos

libs:	$(LIBCURSES)

clean:
	-rm -rf *.o trace $(LIBCURSES) $(DEMOS)

demos:	$(DEMOS)
	strip $(DEMOS)

$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
	ar rv $@ $?
	-$(RANLIB) $@

$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_SDL_H)
$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
tui.o tuidemo.o : $(PDCURSES_CURSES_H)
terminfo.o: $(TERM_HEADER)
panel.o ptest: $(PANEL_HEADER)

$(LIBOBJS) : %.o: $(srcdir)/%.c
	$(BUILD) $(SFLAGS) -c $<

$(PDCOBJS) : %.o: $(osdir)/%.c
	$(BUILD) $(SFLAGS) -c $<

firework: $(demodir)/firework.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

newdemo: $(demodir)/newdemo.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

ptest: $(demodir)/ptest.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

rain: $(demodir)/rain.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

testcurs: $(demodir)/testcurs.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

tuidemo: tuidemo.o tui.o
	$(LINK) tui.o tuidemo.o -o $@ $(LDFLAGS)

worm: $(demodir)/worm.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

xmas: $(demodir)/xmas.c
	$(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)

sdltest: $(osdir)/sdltest.c
	$(BUILD) $(DEMOFLAGS) $(SFLAGS) -o $@ $< $(LDFLAGS)

tui.o: $(demodir)/tui.c $(demodir)/tui.h
	$(BUILD) -c $(DEMOFLAGS) $(demodir)/tui.c

tuidemo.o: $(demodir)/tuidemo.c
	$(BUILD) -c $(DEMOFLAGS) $(demodir)/tuidemo.c
0

Nie używaj „zwykłego” makefile'a, bo jest pod Linuksa, tylko tego dla mingw.

0

Teraz mysle ze juz blizej celu, bledy wyrzuca juz przy tworzeniu plikow.exe a wiec jest blisko, teraz jak jest to Makefile.mng to ustawilem tam CC = x86_64-w64-mingw32-gcc i robie make -f Makefile.mng to tak to wyglada:

x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/addch.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/addchstr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/addstr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/attr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/beep.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/bkgd.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/border.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/clear.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/color.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/delch.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/deleteln.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/deprec.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/getch.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/getstr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/getyx.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/inch.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/inchstr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/initscr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/inopts.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/insch.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/insstr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/instr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/kernel.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/keyname.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/mouse.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/move.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/outopts.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/overlay.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/pad.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/panel.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/printw.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/refresh.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/scanw.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/scr_dump.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/scroll.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/slk.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/termattr.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/terminfo.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/touch.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/util.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/window.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../pdcurses/debug.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdcclip.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdcdisp.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdcgetsc.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdckbd.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdcscrn.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdcsetsc.c
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -c ../sdl1/pdcutil.c
x86_64-w64-mingw32-ar rcv libpdcurses.a addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o clear.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o inch.o inchstr.o initscr.o inopts.o insch.o insstr.o instr.o kernel.o keyname.o mouse.o move.o outopts.o overlay.o pad.o panel.o printw.o refresh.o scanw.o scr_dump.o scroll.o slk.o termattr.o terminfo.o touch.o util.o window.o debug.o pdcclip.o pdcdisp.o pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o pdcutil.o 
a - addch.o
a - addchstr.o
a - addstr.o
a - attr.o
a - beep.o
a - bkgd.o
a - border.o
a - clear.o
a - color.o
a - delch.o
a - deleteln.o
a - deprec.o
a - getch.o
a - getstr.o
a - getyx.o
a - inch.o
a - inchstr.o
a - initscr.o
a - inopts.o
a - insch.o
a - insstr.o
a - instr.o
a - kernel.o
a - keyname.o
a - mouse.o
a - move.o
a - outopts.o
a - overlay.o
a - pad.o
a - panel.o
a - printw.o
a - refresh.o
a - scanw.o
a - scr_dump.o
a - scroll.o
a - slk.o
a - termattr.o
a - terminfo.o
a - touch.o
a - util.o
a - window.o
a - debug.o
a - pdcclip.o
a - pdcdisp.o
a - pdcgetsc.o
a - pdckbd.o
a - pdcscrn.o
a - pdcsetsc.o
a - pdcutil.o
x86_64-w64-mingw32-gcc -O2 -Wall -I.. -o testcurs.exe ../demos/testcurs.c -mwindows libpdcurses.a -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libSDL.dll.a when searching for -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/lib/libSDL.dll.a when searching for -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: skipping incompatible /usr/x86_64-w64-mingw32/lib/libSDL.dll.a when searching for -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libSDL.dll.a when searching for -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/lib/libSDL.dll.a when searching for -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: skipping incompatible /usr/x86_64-w64-mingw32/lib/libSDL.dll.a when searching for -lSDL
/usr/lib/gcc/x86_64-w64-mingw32/5.2.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lSDL
collect2: error: ld returned 1 exit status
Makefile.mng:93: polecenia dla obiektu 'testcurs.exe' nie powiodły się
make: *** [testcurs.exe] Błąd 1
0

A jak z powrotem ustawilem CC = gcc to tak mam

gcc -O2 -Wall -I.. -c ../pdcurses/addch.c
gcc -O2 -Wall -I.. -c ../pdcurses/addchstr.c
gcc -O2 -Wall -I.. -c ../pdcurses/addstr.c
gcc -O2 -Wall -I.. -c ../pdcurses/attr.c
gcc -O2 -Wall -I.. -c ../pdcurses/beep.c
gcc -O2 -Wall -I.. -c ../pdcurses/bkgd.c
gcc -O2 -Wall -I.. -c ../pdcurses/border.c
gcc -O2 -Wall -I.. -c ../pdcurses/clear.c
gcc -O2 -Wall -I.. -c ../pdcurses/color.c
gcc -O2 -Wall -I.. -c ../pdcurses/delch.c
gcc -O2 -Wall -I.. -c ../pdcurses/deleteln.c
gcc -O2 -Wall -I.. -c ../pdcurses/deprec.c
gcc -O2 -Wall -I.. -c ../pdcurses/getch.c
gcc -O2 -Wall -I.. -c ../pdcurses/getstr.c
gcc -O2 -Wall -I.. -c ../pdcurses/getyx.c
gcc -O2 -Wall -I.. -c ../pdcurses/inch.c
gcc -O2 -Wall -I.. -c ../pdcurses/inchstr.c
gcc -O2 -Wall -I.. -c ../pdcurses/initscr.c
gcc -O2 -Wall -I.. -c ../pdcurses/inopts.c
gcc -O2 -Wall -I.. -c ../pdcurses/insch.c
gcc -O2 -Wall -I.. -c ../pdcurses/insstr.c
gcc -O2 -Wall -I.. -c ../pdcurses/instr.c
gcc -O2 -Wall -I.. -c ../pdcurses/kernel.c
gcc -O2 -Wall -I.. -c ../pdcurses/keyname.c
gcc -O2 -Wall -I.. -c ../pdcurses/mouse.c
gcc -O2 -Wall -I.. -c ../pdcurses/move.c
gcc -O2 -Wall -I.. -c ../pdcurses/outopts.c
gcc -O2 -Wall -I.. -c ../pdcurses/overlay.c
gcc -O2 -Wall -I.. -c ../pdcurses/pad.c
gcc -O2 -Wall -I.. -c ../pdcurses/panel.c
gcc -O2 -Wall -I.. -c ../pdcurses/printw.c
gcc -O2 -Wall -I.. -c ../pdcurses/refresh.c
gcc -O2 -Wall -I.. -c ../pdcurses/scanw.c
gcc -O2 -Wall -I.. -c ../pdcurses/scr_dump.c
gcc -O2 -Wall -I.. -c ../pdcurses/scroll.c
gcc -O2 -Wall -I.. -c ../pdcurses/slk.c
gcc -O2 -Wall -I.. -c ../pdcurses/termattr.c
gcc -O2 -Wall -I.. -c ../pdcurses/terminfo.c
gcc -O2 -Wall -I.. -c ../pdcurses/touch.c
gcc -O2 -Wall -I.. -c ../pdcurses/util.c
gcc -O2 -Wall -I.. -c ../pdcurses/window.c
gcc -O2 -Wall -I.. -c ../pdcurses/debug.c
gcc -O2 -Wall -I.. -c ../sdl1/pdcclip.c
In file included from ../sdl1/SDL_stdinc.h:30:0,
                 from ../sdl1/SDL_main.h:26,
                 from ../sdl1/SDL.h:30,
                 from ../sdl1/pdcsdl.h:5,
                 from ../sdl1/pdcclip.c:3:
../sdl1/SDL_config.h:42:32: fatal error: SDL_config_minimal.h: Nie ma takiego pliku ani katalogu
compilation terminated.
Makefile.mng:89: polecenia dla obiektu 'pdcclip.o' nie powiodły się
make: *** [pdcclip.o] Błąd 1

Brakuje mi jednego naglowka ? dlaczego przeciez powinien byc w zrodlach nie ?

znalazlem gdzies tresc tego naglowka tworzylem taki plik w zrodlach ale jeszcze wiecej errorow wywalilo

                 from ../sdl1/pdcclip.c:3:
../sdl1/SDL_stdinc.h:98:9: error: unknown type name ‘int8_t’
 typedef int8_t  Sint8;
         ^
../sdl1/SDL_stdinc.h:123:20: error: size of array ‘SDL_dummy_sint8’ is negative
        typedef int SDL_dummy_ ## name[(x) * 2 - 1]
                    ^
../sdl1/SDL_stdinc.h:126:1: note: in expansion of macro ‘SDL_COMPILE_TIME_ASSERT’
 SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
 ^
../sdl1/pdcclip.c: In function ‘PDC_getclipboard’:
../sdl1/pdcclip.c:59:11: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
     len = strlen(pdc_SDL_clipboard);
           ^
../sdl1/pdcclip.c:59:11: warning: incompatible implicit declaration of built-in function ‘strlen’
../sdl1/pdcclip.c:59:11: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
../sdl1/pdcclip.c:63:5: warning: implicit declaration of function ‘strcpy’ [-Wimplicit-function-declaration]
     strcpy(*contents, pdc_SDL_clipboard);
     ^
../sdl1/pdcclip.c:63:5: warning: incompatible implicit declaration of built-in function ‘strcpy’
../sdl1/pdcclip.c:63:5: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
../sdl1/pdcclip.c: In function ‘PDC_setclipboard’:
../sdl1/pdcclip.c:84:9: warning: incompatible implicit declaration of built-in function ‘strcpy’
         strcpy(pdc_SDL_clipboard, contents);
         ^
../sdl1/pdcclip.c:84:9: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
../sdl1/pdcclip.c: In function ‘PDC_freeclipboard’:
../sdl1/pdcclip.c:106:13: warning: incompatible implicit declaration of built-in function ‘strlen’
         if (strlen(contents) >= strlen("PDCURSES"))
             ^
../sdl1/pdcclip.c:106:13: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
../sdl1/pdcclip.c:107:13: warning: incompatible implicit declaration of built-in function ‘strcpy’
             strcpy(contents, "PDCURSES");
             ^
../sdl1/pdcclip.c:107:13: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
Makefile.mng:89: polecenia dla obiektu 'pdcclip.o' nie powiodły się
make: *** [pdcclip.o] Błąd 1

. Jakie porady co do tej kompilacji? co robie zle ?

0

Jeśli się nie mylę, to x86_64-w64-mingw32-gcc generuje 64-bitowe exeki, a libki pewnie dałeś 32-bitowe.

0

no paczka nazywa sie "SDL-devel-1.2.15-mingw32.tar.gz (Mingw32)" <- takze nie wiem, a skad mam wziac 64bitowe libki ? jak sciagnalem stamtad paczke o nazwie "SDL-1.2.15-win32-x64.zip (64-bit Windows)" to tylko jeden plik SDL.dll tam jest w tej paczce. Czyli skad wziac inne libki ? Jakby ktos z was mogl obczaic te paczki na tej stronie libsdl.org byloby swietnie

0

@Azarien dzieki, mamy to, skompilowalo ladnie i mam execzki :)

Ale one sa 32bit, zeby miec 64bitowe mowiles ze musze przedkompilowac SDL pod win32-x64 tak ? Czyli takich nie moge sciagnac skompilowanych ze strony libsdl ? czyli ktore sciagnac ? Ogolnie jak przekompilowac to SDL pod win32-x64 ?

0

Ale one sa 32bit, zeby miec 64bitowe

No i dobrze, nie potrzebujesz raczej 64-bitowych exeków, przecież 32-bitowe będą tak samo działać.

mowiles ze musze przedkompilowac SDL pod win32-x64 tak

Na to wygląda, jeśli w oficjalnych paczkach nie ma 64-bitowych libek.

Ogolnie jak przekompilowac to SDL

Nie wiem, nie patrzyłem. SDL kompilowałem tylko pod Visual Studio pod Windowsem.

0

Dobra popatrze po tych libach, moze odwiedze czat sdl'a i popytam tam albo gdzies indziej, dzieki za pomoc z tym.

Azarien napisał(a):

Ale one sa 32bit, zeby miec 64bitowe

No i dobrze, nie potrzebujesz raczej 64-bitowych exeków, przecież 32-bitowe będą tak samo działać.

Jak to tak samo ? Nie ma roznicy w dzialaniu programow 32 i 64 bit ? A jesli jest to jaka ?

0

Jak to tak samo

32-bitowe programy działają bez problemu na 64-bitowych Windowsach. ale nie odwrotnie.

Nie ma roznicy w dzialaniu programow 32 i 64 bit

poza pewnymi niuansami nie ma.

?

nie stawiamy spacji przed znakiem zapytania.

0
Azarien napisał(a):

Nie ma roznicy w dzialaniu programow 32 i 64 bit

poza pewnymi niuansami nie ma.

Jakimi niuansami ? Wyjasnisz co to za niuanse albo dasz linka gdzies gdzie moge o tym poczytac ?

1 użytkowników online, w tym zalogowanych: 0, gości: 1