This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

X-Query (imp & urgent)


Hello All,
I have installed g++ for Windows on my System and was trying to build
a project on the same. It is like this that when I disable the GUI
portion from my project my project builds very fine and executable
works fine also but when I want to enable the GUI portion also there
are a few errors.

1)
Portion for enabling or disabling GUI is like
#define NO_GRAPHICS /* comment or uncomment this line*/ --line 1
#ifndef NO_GRAPHICS

#include <X11/Xlib.h>
#include <X11/Xutil.h>

//#include <X11/Xos.h> //----line---2
#include <X11/Xatom.h>

#endif

Here if I comment line line 1 it first gives the compilation error
itself for not being able to find Xos.h
Query #1
So first thing I want to know is why  Xos.h is not available with g++
for Windows and or what is the alternative for that.


However If i comment this line 2 there comes a linker errror with a
lot of messages..........but all similar to
undefined reference to XSetFont
undefined reference to XCreateWindow

basically all related to XWindow APIs..but all of them have been
declared as extern in other include files of X11 folder.
So my second query is
how can i specify my lib include directory in cygwin through windows
i.e. with which option -ldirectory or what.

when i speciifed -ldirectory d:\cygwin....\lib it says that it can not
find the path ........
so what is equivalent in terms of /usr/lib ..or like .....what ....


those interested my makefiles ......here is partial but only useful
section ..........

$$$$$$$$$$$$$makefile

CC = gcc

#SunOS lines below.
#LIB_DIR = -L/usr/lib/X11R5
#LIB = -static -lX11 -lm
#X11_INCLUDE = -I/usr/include

# On many non-Solaris machines, use LIB_DIR = -L/usr/lib/X11R5

LIB_DIR = -L/usr/openwin/lib


# Sometimes get errors under Solaris if you don't use the -R option
# to (I think) put info about where the shared object libraries are
# right into the binary.  Shouldn't be necessary, but it is on our machines.

LIB = -lX11 -lm -R/usr/openwin/lib

X11_INCLUDE = -I/usr/openwin/include

# Overly strict flags line below.  Lots of useless warnings, but can
# let you look for redudant declarations.
# To avoid redundant declarations here I use -D__STDC instead of
# -D__USE_FIXED_PROTOTYPES, but that means some prototypes are missing.

#FLAGS = -Wall -Wpointer-arith -Wcast-qual -Wstrict-prototypes -O
-D__STDC__ -ansi -pedantic -Wredundant-decls -Wmissing-prototypes
-Wshadow -Wcast-align -D_POSIX_SOURCE

#Flags to be passed to the compiler.  First is for strict warnings,
#second for interactive debugging and third for optimization.

#-D_POSIX_SOURCE stops extra declarations from being included in math.h
#and causing -Wshadow to complain about conflicts with y1 in math.h
#(Bessel function 1 of the second kind)

WARN_FLAGS = -Wall -Wpointer-arith -Wcast-qual -Wstrict-prototypes -O
-D__USE_FIXED_PROTOTYPES__ -ansi -pedantic -Wmissing-prototypes
-Wshadow -Wcast-align -D_POSIX_SOURCE
DEBUG_FLAGS = -g
OPT_FLAGS = -O3

#FLAGS = $(WARN_FLAGS)
#FLAGS = $(DEBUG_FLAGS)
FLAGS = $(OPT_FLAGS)

#Uncomment line below if X Windows isn't installed on your system.
#FLAGS = $(OPT_FLAGS) -DNO_GRAPHICS

#Useful flags on HP machines
#DEBUG_FLAGS = -Aa -g
#OPT_FLAGS = -Aa +O3

EXE = vpr

OBJ = main.o util.o read_netlist.o print_netlist.o check_netlist.o
read_arch.o place_and_route.o place.o route_common.o route_timing.o
route_tree_timing.o route_breadth_first.o draw.o graphics.o stats.o
segment_stats.o rr_graph.o rr_graph2.o rr_graph_sbox.o rr_graph_util.o
rr_graph_timing_params.o rr_graph_indexed_data.o rr_graph_area.o
check_rr_graph.o check_route.o hash.o heapsort.o read_place.o
net_delay.o path_delay.o path_delay2.o vpr_utils.o
timing_place_lookup.o timing_place.o

SRC = main.c util.c read_netlist.c print_netlist.c check_netlist.c
read_arch.c place_and_route.c place.c route_common.c route_timing.c
route_tree_timing.c route_breadth_first.c draw.c graphics.c stats.c
segment_stats.c rr_graph.c rr_graph2.c rr_graph_sbox.c rr_graph_util.c
rr_graph_timing_params.c rr_graph_indexed_data.c rr_graph_area.c
check_rr_graph.c check_route.c hash.c heapsort.c read_place.c
net_delay.c path_delay.c path_delay2.c test_h.c vpr_utils.c
timing_place_lookup.c timing_place.c

H = util.h vpr_types.h globals.h graphics.h read_netlist.h
print_netlist.h check_netlist.h read_arch.h stats.h segment_stats.h
draw.h place_and_route.h place.h route_export.h route_common.h
route_timing.h route_tree_timing.h route_breadth_first.h rr_graph.h
rr_graph2.h rr_graph_sbox.h rr_graph_util.h rr_graph_timing_params.h
rr_graph_indexed_data.h rr_graph_area.h check_rr_graph.h check_route.h
hash.h heapsort.h read_place.h path_delay.h path_delay2.h net_delay.h
vpr_utils.h timing_place_lookup.h timing_place.h


# I haven't been able to make -static work under Solaris.  Use shared
# libraries all the time.

# Add purify before $(CC) in the link line below to run purify on VPR.

$(EXE): $(OBJ) test_h.o
	$(CC) $(FLAGS) $(OBJ) -o $(EXE) $(LIB_DIR) $(LIB)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]