How can I correctly pass parameters to the TCC compiler on the Windows command line indicating the search paths for files from the PDCurses library?
Hellocurses.c code:
#include <curses.h>int main(void){
initscr();
addstr("Hello PDCurses from tcc!\n");
refresh();
getch();
endwin();
return 0;
}
I'm doing:
tcc hellocurses.c -o hellocurses
Compiler message:
hellocurses.c:1: error: include file 'curses.h' not found
I'm doing:
tcc hellocurses.c -IC:\PDCurses -o hellocurses
Compiler message:
tcc: error: undefined symbol 'initscr'
tcc: error: undefined symbol 'addstr'
tcc: error: undefined symbol 'refresh'
etc.
I'm doing:
tcc hellocurses.c -IC:\PDCurses -LC:\PDCurses\wincon -o hellocurses
The compiler message is the same.
The C:\PDCurses folder contains the header filescurses.h, curspriv.h and panel.h
The C:\PDCurses\wincon folder contains the object code of all library functions and the filepdcurses.lib
Did. Now the compiler writes tcc: error: library 'pdcurses' not found
Ipsum2022-02-06 12:42:39yes, I forgot that on win the format of static libraries is different for different compilers ... as far as I understand, * .lib is a static msvc library, and gcc /tcc are looking for static libraries * .a ... actually the question is: how exactly did you build pdcurses /where did it come from took?
Fat-Zer2022-02-06 12:58:26Using nmake from the Visual Studio package
Ipsum2022-02-06 13:02:51um... that's the problem: you need to build it with tcc...
Fat-Zer2022-02-06 13:03:59- c : Why does MinGW mangle RBP?
- About binary search trees and arrays
- Process tree output in console
- I don't know the cause of the segmentation fault (core dump).
- c++ CONTAINING_RECORD and standart layout
- Differences between GTK 2 and GTK 3, as well as differences between Glade versions
- c : How to install the GMP library
- C: problem with getchar () and eof (^ z) in Windows Console
- c : Additional memory for window
-lpdcurses add... or just tcc hellocurses.c C:\PDCurses\wincon\pdcurses.lib -IC:\PDCurses...
Fat-Zer2022-02-06 12:39:41