Makefile + #includes


 
Thread Tools Search this Thread
Top Forums Programming Makefile + #includes
# 1  
Old 07-23-2010
Makefile + #includes

Dear all

I try to write a makefile for my code which have many source files, 1 header file that i make and exist into same folder with other source files and some other header files (by libraries witch i use) that found in other folders.

In my header file i have put all other #includes for residuals headers and by each source file, i call only my header file.

The problem is in first step at compiling source files to object.

When it tries to compile that source file in which exist some new variable type by other libraries, give me an error that no recognizes this type.

How must i write the makefile? Why occur this?
# 2  
Old 07-23-2010
My crystal ball is still in for maintenance. Please paste the actual error messages.
# 3  
Old 07-24-2010
when it tries to compile createrunstruct file, it is occur this:

createrunstruct.c: In function ‘createrunstruct':
createrunstruct.c:31: error: ‘idxtype' undeclared (first use in this function)
createrunstruct.c:31: error: (Each undeclared identifier is reported only once
createrunstruct.c:31: error: for each function it appears in.)
make: *** [createrunstruct.o] Error 1
# 4  
Old 07-24-2010
It means what it says: 'idxtype' is undeclared. Either you haven't included the right header, or your use of the type is wrong. Beyond that I can't tell, you'd need to post the source code.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to pipe a filename that includes a date?

How do I pipe the output of something to a filename that includes the date, in a specific date format? Here's the goal. Output a script to a file periodically during the day: ./script.sh >>logname_yyyy-mm-dd.logAnd when the next day comes, it starts logging to a new filename because the date... (2 Replies)
Discussion started by: nbsparks
2 Replies

2. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

3. Programming

Makefile includes and shell environment during compile

Below is the top of my Makefile. On one machine, I have mysql_config5, and another, I have mysql_config. In my .bashrc file of one UNIX machine, I added an alias so that that mysql_config5 is mysql_config, however, when I do make, it doesn't use that environment and I get compile errors, unless I... (1 Reply)
Discussion started by: pyramation
1 Replies

4. Shell Programming and Scripting

how to search for string that includes folder separator ?

I want to select only second line. I want to search for any line that has both -> input.txt /userA/aaaaaaabbb/jakarta /userA/aaaaaaa/jakarta /userB/aaaaaaabbb/jakarta /userB/aaaaaaa/jakarta This command does have effect of --> $>cat input.txt | /usr/xpg4/bin/grep -E... (13 Replies)
Discussion started by: kchinnam
13 Replies

5. Shell Programming and Scripting

SFTP STDERR includes the acknowledgement

I have this problem on my SFTP script. When you direct the standard error to a file, it also contains the acknlowledgement. See below: sftp.log Connecting to xxx.xxx.xxx This computer is property of x company and is intended on... Connecting to xxx.xxx.xxx This computer is property... (0 Replies)
Discussion started by: The One
0 Replies

6. Programming

Multi-platform includes?

I know that <cstudio> can also be <stdio> and can be written different ways on Linux then with windows. I've see some code doing a IFDEF __APPLE__ (I'm guessing, if compiled on a mac do whats between this) Is there one for Linux/Window? (3 Replies)
Discussion started by: james2432
3 Replies

7. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

8. Shell Programming and Scripting

passing string which includes metacharacters

I'm trying to create a bash script that takes a URL as one of its arguments like this: ./script.sh http://url.cfm?asdf&asdf=234 variable=$1 echo $variable I'm having trouble storing the URL because it contains the meta character "&" which is being interpreted... thus when I run the... (4 Replies)
Discussion started by: kds1398
4 Replies

9. UNIX for Advanced & Expert Users

..to check if a line includes a subline..?

What would be the best way to check if a particular line (in variable) has an another line (more than 1 char)? I understand it could be done with 'grep', 'sad', 'awk', by parameter expansion, but all these seems to me havy, worldy, not elegant and overhead in processing For so common task... (2 Replies)
Discussion started by: alex_5161
2 Replies
Login or Register to Ask a Question