CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

gcc and executable file from Mac to Linux

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2007, 16:49
Default gcc and executable file from Mac to Linux
  #1
simone Marras
Guest
 
Posts: n/a
good afternoon, this is probably not the right forum, but maybe someone already encountered the same problem; I wrote a NS solver in C on my mac, and used gcc-4.0 to compile it and it compiles nirmally and generates my working executable also. When I try to generate the same exe on a Linux machine, even if it compiles without any problem, once I execute the executable output, it does not do any of the calculations. Here is my makefile in case it can help. i hope someone can help me

thanks

simone ------- makefile:

# Makefile for the code PanelMethod.c

# Varialble Definitions and Flags:

CC = gcc #Compiler is gcc LD = gcc #Linker is gcc also

CFALGS = -Wall CDEBUG = -g

# Linker flags go here. Currently there aren't any, but if we'll switch to # code optimization, we might add "-s" here to strip debug info and symbols. LDFLAGS =

# List of source codes and generated object files: SRCS = main.c nrutil.c READ_INPUT.c PRINT.c COMP_DXI_DYJ.c GRID_COORD.c wrt_f.c wrt_fvect.c INIT_FLAG.c INIT_UVP.c SETBCOND.c SETSPECBCOND.c COMP_DELT.c COMP_FG.c COMP_RHS.c NON_STAG_UV.c POISSON.c ADAP_UV.c COORDINATES.c uv_INTERPOLATION.c PARTICLE_TRACING.c COMP_PSI_ZETA.c OBJS = main.o nrutil.o READ_INPUT.o PRINT.o COMP_DXI_DYJ.o GRID_COORD.o wrt_f.o wrt_fvect.o INIT_FLAG.o INIT_UVP.o SETBCOND.o SETSPECBCOND.o COMP_DELT.o COMP_FG.o COMP_RHS.o NON_STAG_UV.o POISSON.o ADAP_UV.o COORDINATES.o uv_INTERPOLATION.o PARTICLE_TRACING.o COMP_PSI_ZETA.o

# ProgRam executable file name: EXE = out

# Top-level rule, to compile everything all: $(EXE)

# Rule to Link the program $(EXE): $(OBJS)

$(LD) $(CFLAGS) -L/usr/include -lm $(OBJS) -o $(EXE)

# Rule for the file "main.o": main.o: main.c

$(CC) $(CFLAGS) -g -I/usr/include -c main.c

# Rule for the file "nrutil.o" nrutil.o: nrutil.c nrutil.h

$(CC) $(CFLAGS) -g -I/usr/include -c nrutil.c

# Rule for the file "READ_INPUT.o" READ_INPUT.o: READ_INPUT.c READ_INPUT.h

$(CC) $(CFLAGS) -g -I/usr/include -c READ_INPUT.c

# Rule for the file "PRINT.o" PRINT.o: PRINT.c PRINT.h

$(CC) $(CFLAGS) -g -I/usr/include -c PRINT.c

# Rule for the file "COMP_DXI_DYJ.o" COMP_DXI_DYJ.o: COMP_DXI_DYJ.c COMP_DXI_DYJ.h

$(CC) $(CFLAGS) -g -I/usr/include -c COMP_DXI_DYJ.c

# Rule for the file "GRID_COORD.o" GRID_COORD.o: GRID_COORD.c GRID_COORD.h

$(CC) $(CFLAGS) -g -I/usr/include -c GRID_COORD.c

# Rule for the file "wrt_f.o" wrt_f.o: wrt_f.c wrt_f.h

$(CC) $(CFLAGS) -g -I/usr/include -c wrt_f.c

# Rule for the file "wrt_fvect.o" wrt_fvect.o: wrt_fvect.c wrt_fvect.h

$(CC) $(CFLAGS) -g -I/usr/include -c wrt_fvect.c

# Rule for the file "INIT_FLAG.o" INIT_FLAG.o: INIT_FLAG.c INIT_FLAG.h

$(CC) $(CFLAGS) -g -I/usr/include -c INIT_FLAG.c

# Rule for the file "INIT_UVP.o" INIT_UVP.o: INIT_UVP.c INIT_UVP.h

$(CC) $(CFLAGS) -g -I/usr/include -c INIT_UVP.c

# Rule for the file "SETBCOND.o" SETBCOND.o: SETBCOND.c SETBCOND.h

$(CC) $(CFLAGS) -g -I/usr/include -c SETBCOND.c

# Rule for the file "SETSPECBCOND.o" SETSPECBCOND.o: SETSPECBCOND.c SETSPECBCOND.h

$(CC) $(CFLAGS) -g -I/usr/include -c SETSPECBCOND.c

# Rule for the file "COMP_DELT.o" COMP_DELT.o: COMP_DELT.c COMP_DELT.h

$(CC) $(CFLAGS) -g -I/usr/include -c COMP_DELT.c

# Rule for the file "COMP_FG.o" COMP_FG.o: COMP_FG.c COMP_FG.h

$(CC) $(CFLAGS) -g -I/usr/include -c COMP_FG.c

# Rule for the file "COMP_RHS.o" COMP_RHS.o: COMP_RHS.c COMP_RHS.h

$(CC) $(CFLAGS) -g -I/usr/include -c COMP_RHS.c

# Rule for the file "NON_STAG_UV.o" NON_STAG_UV.o: NON_STAG_UV.c NON_STAG_UV.h

$(CC) $(CFLAGS) -g -I/usr/include -c NON_STAG_UV.c

# Rule for the file "POISSON.o" POISSON.o: POISSON.c POISSON.h

$(CC) $(CFLAGS) -g -I/usr/include -c POISSON.c

# Rule for the file "ADAP_UV.o" ADAP_UV.o: ADAP_UV.c ADAP_UV.h

$(CC) $(CFLAGS) -g -I/usr/include -c ADAP_UV.c

# Rule for the file "COORDINATES.o" COORDINATES.o: COORDINATES.c COORDINATES.h

$(CC) $(CFLAGS) -g -I/usr/include -c COORDINATES.c

# Rule for the file "uv_INTERPOLATION.o" uv_INTERPOLATION.o: uv_INTERPOLATION.c uv_INTERPOLATION.h

$(CC) $(CFLAGS) -g -I/usr/include -c uv_INTERPOLATION.c

# Rule for the file "PARTICLE_TRACING.o" PARTICLE_TRACING.o: PARTICLE_TRACING.c PARTICLE_TRACING.h

$(CC) $(CFLAGS) -g -I/usr/include -c PARTICLE_TRACING.c

# Rule for the file "COMP_PSI_ZETA.o" COMP_PSI_ZETA.o: COMP_PSI_ZETA.c COMP_PSI_ZETA.h

$(CC) $(CFLAGS) -g -I/usr/include -c COMP_PSI_ZETA.c

  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 23:59.