Code::Blocks
July 25, 2014, 08:43:05 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!
 
   Home   Help Search Login Register  :: WebsiteWiki  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Compiling pdcurses with mingw on windows  (Read 3794 times)
Lefteris
Advanced newcomer
*
Offline Offline

Posts: 14


« on: July 17, 2009, 12:47:27 am »

Hey all,

I wanted to use pdcurses in windows in a simple console application I am making. My IDE is codeblocks but before everything else I had to compile pdcurses. According to what I read from googling and according to the readme file it should have been pretty straightforward. I should just get to the directory of pdcurses/win32 and when in there issue the following command:

mingw32-make -f mingwwin32.mak     (since I am using gcc). The problem with this is that it gives errors while making. Do you have any idea what I am doing wrong? I am really scratching my head and trying to google for a similar problem but I get nothing. Any help would be appreciated. Here are the errors :


Code:
....
....
.....
a - pdcdisp.o
a - pdcgetsc.o
a - pdckbd.o
a - pdcscrn.o
a - pdcsetsc.o
a - pdcutil.o
copy pdcurses.a panel.a
process_begin: CreateProcess(NULL, copy pdcurses.a panel.a, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [pdcurses.a] Error 2 (ignored)
gcc -O2 -Wall -I.. -otestcurs.exe ../demos/testcurs.c pdcurses.a
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cceiQplg.o:testcurs.c:(.text+0x71c): undefine
d reference to `__ctype_ptr'
pdcurses.a(initscr.o):initscr.c:(.text+0xed): undefined reference to `_impure_pt
r'
pdcurses.a(initscr.o):initscr.c:(.text+0x31c): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x352): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x388): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x3be): undefined reference to `_impure_p
tr'
pdcurses.a(pdcscrn.o):pdcscrn.c:(.text+0x802): more undefined references to `_im
pure_ptr' follow
collect2: ld returned 1 exit status
mingw32-make: *** [testcurs.exe] Error 1
Logged
stahta01
Lives here!
****
Offline Offline

Posts: 4310


WWW
« Reply #1 on: July 17, 2009, 06:46:11 am »

Re-install MinGW and If you have Vista make sure it is a MinGW GCC that works with Vista.

NOTE: This post has little to do with Code::Blocks; so, it likely will be locked.

See Link; Q6 does not necessarily have the exact cause of your problem;
But, please read the makefile to see what commands it expects to exist.
I am guessing, the "copy" command is missing from the message.

http://help.eclipse.org/ganymede/topic/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm

Note: I just read the make file and the copy command failing might be normal.

I suggest posting more info in a better group for this type of problem.
The minimal info is:
OS: example XP
OS Version: example XP SP3
MinGW GCC Version: example 3.4.5 (mingw-vista special r3)
Library Name and Version: example pdcurses CVS

Tim S
« Last Edit: July 17, 2009, 07:11:44 am by stahta01 » Logged

C Programmer working to learn more about C++.
Compiling CB Trunk against wxWidgets WX_3_0_BRANCH branch.
--
When in doubt, read the CB WiKi FAQ.
Lefteris
Advanced newcomer
*
Offline Offline

Posts: 14


« Reply #2 on: July 17, 2009, 08:45:24 am »

Hello and thanks for your reply. I realize that this is not codeblocks related. My OS is XP SP3 and the mingw gcc is indeed 3.4.5.  You were right on.

I will post this in another forum too if this gets locked I guess. Again thanks for your reply.

EDIT:

I managed to find what was wrong. The problem lied with io.h of mingw. In my system I had two microprocessor toolchains installed. One for AVR family of processors and one for the blackfin one. Somehow they messes up my mingw's io.h.

In order to correct it I just removed the two aforementioned toolchains from my System's PATH and it compiled perfectly and is now working perfectly with my codeblocks project Smiley
« Last Edit: July 17, 2009, 02:40:12 pm by Lefteris » Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!