C++ :: Compile OpenGL Program In Ubuntu
Aug 15, 2014
I am trying to compile an OpenGL program in Ubuntu.This program opens a blank window.
Code:
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <cstdio>
#include <iostream>
int main(int argc,char* argv[])
[code]....
View 6 Replies
ADVERTISEMENT
Sep 27, 2014
what can i do to fix ? why do i get the error ?
View 2 Replies
View Related
Jul 7, 2013
I'm learning OpenGL 3.2+ with GLFW and GLEW.
I'm learning it through this series of tutorials [URL] but when I run the first code:
#include <iostream>
#include <cstdlib>
#include <GL/glfw.h>
#define GLEW_STATIC
#include <GL/glew.h>
int main() {
glfwInit();
glewExperimental = GL_TRUE;
[code]....
(Then i have the glew.h that is about 17000 lines of code)
I get this errors:
c:archivos de programacodeblocksmingwin..libgccmingw324.7.1........includeGLglew.h|84|error: #error gl.h included before glew.h|
c:archivos de programacodeblocksmingwin..libgccmingw324.7.1........includeGLglew.h|1793|error: 'GLchar' does not name a type|
c:archivos de programacodeblocksmingwin..libgccmingw324.7.1........includeGLglew.h|1804|error: 'GLchar' has not been declared|
[code]....
What I'm doing wrong?
View 12 Replies
View Related
Feb 13, 2014
i want programcode which can be executed for create database add delete record in ubuntu
View 1 Replies
View Related
May 22, 2013
I have created a shared object in Ubuntu (libMYLIB.so). I am now trying to compile a simple test program (testmylib.c) to see if the shared object is properly built. I am getting an error that the build cannot find the shared object. My build command is:
gcc -lm -l /dir/mylib -lMYLIB.so -o testmylib testmylib.c
where /dir/mylib is where my source and libMYLIB.so reside.
What am I doing wrong?
View 9 Replies
View Related
Feb 28, 2015
I am getting some weird errors while building in release mode. It works fine in debug mode. Libraries and includes are linked in both debug and release version, but it's acting like it's not.
main.cpp
#define GLEW_STATIC
#include <glew.h>
[Code].....
View 2 Replies
View Related
Mar 19, 2013
How to compile and run program from DOS shell. Any list of procedures....
View 1 Replies
View Related
Apr 30, 2013
I am currently learning C and im in the middle of completing my assignment. It has to calculate parking whilst account for a few values here is the assignment sheet for specifics. Design Specifications Write, compile and test a C program with appropriate use..It's practically error less yet when i compile it doesn't come up with what i need.
Code:
/* Pre-Processor Directive */
#include <stdio.h>
#include <stdbool.h>
#define DISCOUNT_TIME_THREE 3
#define DISCOUNT_TIME_TEN 10
#define DISCOUNT_RATE_TWO 0.2
#define DISCOUNT_RATE_FOUR 0.4
[Code]....
View 2 Replies
View Related
Apr 27, 2013
I hate vague errors where I don't even know where to start looking for an error. Error happens immediately and it says "Unhandled exception at 0x5981c9c7 (msvcr100d.dll) in experiment.exe: 0xC0000005: Access violation reading location 0xabababab."
#include <iostream>
#include <string>
#include <conio.h>
[Code].....
View 2 Replies
View Related
Sep 18, 2014
This is my problem. What should I do to be able to compile this program?
View 7 Replies
View Related
Jan 16, 2014
Here is the code which I wrote in Turbo C++...its giving errors..
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
voidmain() {
clrscr();
[code]....
View 8 Replies
View Related
Nov 8, 2013
Need getting my program to compile.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//prototypes
int arithGame(int max, int op);
int guessGame();
[Code] .....
View 3 Replies
View Related
Oct 30, 2014
My program needs to compile various source files at runtime.What is the most elegant way to compile cross platform with g++ from within my program? Is there a gcc-library I can use? I know that I could use popen() to open a Unix pipe and call g++ as command line tool. But first it isn't really cross platform and second it doesn't seem elegant to me.
View 10 Replies
View Related
Feb 15, 2015
I can't compile the simplest boost asio program #include <boost/asio.hpp> int main(){}
Code Blocks 13.12 writes out message "swprintf was not declared in this scope". (within win_static_mutex.ipp file)
Visual Studio 2013 writes a lot more (within win_iocp_io_service.ip file), to begin with: "min is not a member of std" and there are a lot of errors in error.hpp file stating "WSA13 identificator is not defined" (WSA13, WSA100, WSA102 etc.)
Almost everything else from boost compiles good.
View 7 Replies
View Related
Jun 20, 2014
I'm using ubuntu 14.04 and I want to cross compile this simple GTKmm program for Windows:
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Glib::RefPtr<Gtk::Application> app =
Gtk::Application::create(argc, argv,
"org.gtkmm.examples.base");
Gtk::ApplicationWindow window;
return app->run(window);
}
I don't know how to do this...When I use this command:
x86_64-w64-mingw32-g++ main.cpp -o hello.exe `x86_64-w64-mingw32-pkg-config gtkmm-3.0 --cflags --libs`
I get this error:
In file included from /usr/include/cairomm-1.0/cairomm/fontoptions.h:26:0,
from /usr/include/cairomm-1.0/cairomm/surface.h:37,
from /usr/include/gdkmm-3.0/gdkmm/pixbuf.h:40,
from /usr/include/gdkmm-3.0/gdkmm/dragcontext.h:31,
from /usr/include/gtkmm-3.0/gtkmm.h:90,
from main.cpp:1:
/usr/include/cairo/cairo-ft.h:50:35: fatal error: fontconfig/fontconfig.h: No such file or directory
#include <fontconfig/fontconfig.h>
[code]....
View 10 Replies
View Related
Aug 24, 2013
I'm trying to get my C program to compile but it's not working at all. I've programmed a little in C++ before but I'm not used to C. Here's my program so far:
Code:
int main(void){
// Establishes variables
int num1, num2, product;
float quotient;
[Code] .....
It keeps giving me an error message as follows:
"/usr/bin/ldrelabwk2: file format not recognized; treating as linker script
/usr/bin/ldrelabwk2:1: syntax error
collect2: ld returned 1 exit status"
View 11 Replies
View Related
Mar 7, 2014
I am currently learning OOP, and I can't figure out what the problem is with my header file. The rest of the program complies fine though. I am using g++ on UNIX.
myClass.h:9:23: error: Rectangle.h: No such file or directory
myClass.h: In function ‘int main()’:
myClass.h:13: error: ‘Rectangle’ was not declared in this scope
myClass.h:13: error: expected `;' before ‘rect’
myClass.h:14: error: ‘rect’ was not declared in this scope
Code:
myClass.h
/* This header file contains, The main function for my rectangle class program.*/
#include "Rectangle.h"
using namespace std;
int main(){
Rectangle rect;
rect.displayMaxRectangles();
rect.process();
rect.summary();
[Code] .....
View 1 Replies
View Related
Nov 29, 2014
I cannot write as binary using .dat format in ubuntu, why?
View 5 Replies
View Related
Apr 21, 2014
How to send a keystroke or a mouse event to another running process in Ubuntu? I want to write a C program that reads data from the USB port sent by AVR Micro Controller board continuously.In response to that it checks the data received and sends a command to another process running on the computer? Example,when the program reads 101 from the USB port it sends left mouse button down to the VLC media player window that is currently running?
View 1 Replies
View Related
Mar 26, 2013
I want to read a file from my flash drive called text.csv. However, I cannot even open the port where my flash drive is connected. This is the code that I am using, but I get error since the first part. When I run the program it says "fopen Error". I am using Ubuntu 12.04.
#include<stdio.h>
#include<string.h>
#define SIZE 1
#define NUMELEM 5
int main(void) {
FILE* fd = NULL;
[Code] ....
View 1 Replies
View Related
Sep 12, 2013
How I can make 2D games in OpenGL. I have sprites, but when I load them in game, they're all big and stuff, not pixel for pixel how I'd like them. How can I do this?
View 16 Replies
View Related
Feb 6, 2014
I am because I don't know what to use OpenGL or DirectX? I heard some people saying I can use both. How is this? What is better for online games? And when I choose I will need some tutorials too ....
View 1 Replies
View Related
Jun 22, 2014
This is my first time using opengl and I am experimenting with adding/drawing polygons/points/etc. on top of a PPM image. The image is already loaded when the application runs. My attempt to draw a square is from lines 30 - 35. The program runs but the square is not present. Just the image.
#include<windows.h>
#include <stdio.h>
#include <stdlib.h>
#include<Gl/gl.h>
#include<GL/glut.h>
int n;
int m;
int *image;
[Code] ....
View 5 Replies
View Related
Jan 3, 2014
i want to draw a 3D snake in opengl.. i can't get nothing out of my search to make a start.. how it is made
View 4 Replies
View Related
Sep 14, 2013
I've read up on .bmp files on wikipedia and am currently attempting to make a function that can export a .bmp file of the screen of my programs. I've already begun work on it but it isn't working. The code I have so far is:
typedef char Byte;
typedef int Byte4;
typedef short Byte2;
struct BMP_Header {
[Code] ....
My problems are that when less then the required amount of bytes is needed to store a value in the file, the 00 bytes are skipped (Ex. The file will contain 42 instead of 42 00 00 00), and the Pixels are stored as nothing but 0D ( every value intended for storing pixel data is 0D ).
View 4 Replies
View Related
Nov 17, 2013
I don't know why, but textures in OpenGL are white. One day, I must've change something, and now my textures wont load properly. I tried rewriting my code that loads things multiple times, my textures still are white. Here is my code:
(I switched back to the FF pipeline temporarily, in my other projects I use shaders.)
Sprite.hpp
#include <SDL.h>
#include <SDL_opengl.h>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#ifndef _SPRITE_H_
#define _SPRITE_H_
[Code] ....
View 2 Replies
View Related