Sponsored Content
Full Discussion: Error Compiling C program
Top Forums Programming Error Compiling C program Post 9110 by Vivek on Tuesday 23rd of October 2001 03:34:30 AM
Old 10-23-2001
Iam compiling using the Following command

cc -o hello hello.c -lpthread

Iam using some of the datastructrues of pthread.h file.

and its givin me Undefined Reference the Global function defined in my Program .

Aby Idea.....
 

10 More Discussions You Might Find Interesting

1. Programming

Compiling a program

Hello. I am trying to run a c program on a unix shell (ssh). I have searched this forum but have not come accross the soultion to my problem, so I am posting my question here :cool: I wrote the following simple code: #include <iostream.h> using namespace std; int main() { ... (7 Replies)
Discussion started by: Minnesota Red
7 Replies

2. Programming

Problem compiling program

hi i am having a problem that when ever i use cc program_name.c to compile a program. an error occurs, showing cc not found. please help. (28 Replies)
Discussion started by: rochitsharma
28 Replies

3. Programming

Compiling a C program

Help I know nothing about c programming. :confused: I want to compile the below c program. It extracts data from an oracle database into csv files. I have oracle 9206 installed with ProC. I dont have gcc My question is. How the hell do I make this into an file I can run? I am pulling... (3 Replies)
Discussion started by: ooploo
3 Replies

4. Programming

help on compiling a C program on Tiger

here is the very simple bob.c: main() { printf("hello"); } i use tiger and i use the command: gcc bob.c and the end result: bob.c: In function ‘main': bob.c:3: warning: incompatible implicit declaration of built-in function /‘printf' any help appreciated, i'm just starting... (4 Replies)
Discussion started by: cleansing_flame
4 Replies

5. Programming

compiling c program in unix

if somebody can help me pls. i need the source code for a shell which compiles C or java programs in unix i need a very short and simple one, just the compiling part Respect (2 Replies)
Discussion started by: zlatan005
2 Replies

6. Programming

Compiling Pro*C program under unix

Hello, I am trying to compile a Pro*C program under unix: proc iname=test.pc works fine but then I am not able to compile the test.c file : gcc test.c -o test.o -L $ORACLE_HOME/lib -l clntsh /usr/bin/ld: Object file format error in: /u01/app/oracle/product/10.1.0.2.0/lib:... (1 Reply)
Discussion started by: nsmrmd
1 Replies

7. Programming

compiling old C program in Linux.

Hello, I am writing to ask for support about compiling an very old but famous C-progam for genetics study called MapMaker/QTL, and the source code is available from MIT: http://www.broadinstitute.org/ftp/distribution/software/mapmaker3/The program was originally designed for systems like SunOS... (1 Reply)
Discussion started by: yifangt
1 Replies

8. UNIX for Advanced & Expert Users

Error compiling program with extension .c

good morning, I have 64-bit DB2 V9.7 AIX 7.1.0.0 I am compiling a C program, when running cc-I / rutadb2/include-c programa.c this error. ksh: cc: not found. how I can check if I have installed the C compiler? Any help will be greatly appreciated. Thank you very much and best regards. (2 Replies)
Discussion started by: systemoper
2 Replies

9. UNIX for Dummies Questions & Answers

How to write files for compiling a program.?

I am hoping someone can give me a good free web resource for writing code to compile a binary executable. I am getting fairly decent at writing shell script, are the .f files just shell scripts? Also, I don't know where to begin on the makefiles. The reason I am curious is because I have been... (6 Replies)
Discussion started by: butson
6 Replies

10. Programming

Error with shared lIBMpi.so.1 when compiling CPP program

Hello, Met a problem when compiling a C++ program from source code without error, but when ran it there was always an error message: ./Ray: error while loading shared libraries: libmpi_cxx.so.1: cannot open shared object file: No such file or directoryAs the error points to openmpi which was... (0 Replies)
Discussion started by: yifangt
0 Replies
GLUSEPROGRAM(3G)						    OpenGL 3.3							  GLUSEPROGRAM(3G)

NAME
glUseProgram - Installs a program object as part of current rendering state C SPECIFICATION
void glUseProgram(GLuint program); PARAMETERS
program Specifies the handle of the program object whose executables are to be used as part of current rendering state. DESCRIPTION
glUseProgram installs the program object specified by program as part of current rendering state. One or more executables are created in a program object by successfully attaching shader objects to it with glAttachShader(), successfully compiling the shader objects with glCompileShader(), and successfully linking the program object with glLinkProgram(). A program object will contain an executable that will run on the vertex processor if it contains one or more shader objects of type GL_VERTEX_SHADER that have been successfully compiled and linked. A program object will contain an executable that will run on the geometry processor if it contains one or more shader objects of type GL_GEOMETRY_SHADER that have been successfully compiled and linked. Similarly, a program object will contain an executable that will run on the fragment processor if it contains one or more shader objects of type GL_FRAGMENT_SHADER that have been successfully compiled and linked. While a program object is in use, applications are free to modify attached shader objects, compile attached shader objects, attach additional shader objects, and detach or delete shader objects. None of these operations will affect the executables that are part of the current state. However, relinking the program object that is currently in use will install the program object as part of the current rendering state if the link operation was successful (see glLinkProgram() ). If the program object currently in use is relinked unsuccessfully, its link status will be set to GL_FALSE, but the executables and associated state will remain part of the current state until a subsequent call to glUseProgram removes it from use. After it is removed from use, it cannot be made part of current state until it has been successfully relinked. If program is zero, then the current rendering state refers to an invalid program object and the results of shader execution are undefined. However, this is not an error. If program does not contain shader objects of type GL_FRAGMENT_SHADER, an executable will be installed on the vertex, and possibly geometry processors, but the results of fragment shader execution will be undefined. NOTES
Like buffer and texture objects, the name space for program objects may be shared across a set of contexts, as long as the server sides of the contexts share the same address space. If the name space is shared across contexts, any attached objects and the data associated with those attached objects are shared as well. Applications are responsible for providing the synchronization across API calls when objects are accessed from different execution threads. ERRORS
GL_INVALID_VALUE is generated if program is neither 0 nor a value generated by OpenGL. GL_INVALID_OPERATION is generated if program is not a program object. GL_INVALID_OPERATION is generated if program could not be made part of current state. GL_INVALID_OPERATION is generated if transform feedback mode is active. ASSOCIATED GETS
glGet() with the argument GL_CURRENT_PROGRAM glGetActiveAttrib() with a valid program object and the index of an active attribute variable glGetActiveUniform() with a valid program object and the index of an active uniform variable glGetAttachedShaders() with a valid program object glGetAttribLocation() with a valid program object and the name of an attribute variable glGetProgram() with a valid program object and the parameter to be queried glGetProgramInfoLog() with a valid program object glGetUniform() with a valid program object and the location of a uniform variable glGetUniformLocation() with a valid program object and the name of a uniform variable glIsProgram() SEE ALSO
glAttachShader(), glBindAttribLocation(), glCompileShader(), glCreateProgram(), glDeleteProgram(), glDetachShader(), glLinkProgram(), glUniform(), glValidateProgram(), glVertexAttrib() COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. OpenGL 3.3 03/08/2011 GLUSEPROGRAM(3G)
All times are GMT -4. The time now is 08:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy