incomplete type 'main()::LinuxCamera' used in nested name specifier.

Hi everyone, I got an error in my program. My program is like

int main()
class LinuxCamera;

error is like
incomplete type 'main()::LinuxCamera' used in nested name specifier.

Why? If you know my mistake, pls kindly tell me. Thanks.

if you want people to help you, post the entire code. This is probably third post I've seen so far for your problem. This is advice to save your time.

And use code tags - the <> button on the right, and don't duplicate your thread.
ok. I will post the entire code.

socket.cpp (this is my program)

#include <netdb.h>
#include <netinet/in.h>
#include <string.h>
#include <stdio.h>
#include <iostream>
#include <cstdlib>

#include "LinuxCamera.h"
class LinuxCamera;

int main()
{ LinuxCamera::GetInstance()->Initialize(0);
fileSEND("localhost", 4547, "1.jpeg", "received.jpeg");
return 0;

this is linuxcamera.h
class LinuxCamera
static LinuxCamera* uniqueInstance;

CameraSettings settings;

int camera_fd;
struct buffer {
void * start;
size_t length;
struct buffer * buffers;
unsigned int n_buffers;


void ErrorExit(const char* s);
int ReadFrame();


FrameBuffer* fbuffer;


static LinuxCamera* GetInstance() { return uniqueInstance; }

int Initialize(int deviceIndex);

int v4l2GetControl(int control);
int v4l2SetControl(int control, int value);
int v4l2ResetControl(int control);

void LoadINISettings(minIni* ini);
void SaveINISettings(minIni* ini);

void SetCameraSettings(const CameraSettings& newset);
const CameraSettings& GetCameraSettings();

void SetAutoWhiteBalance(int isAuto) { v4l2SetControl(V4L2_CID_AUTO_WHITE_BALANCE, isAuto); }
unsigned char GetAutoWhiteBalance() { return (unsigned char)(v4l2GetControl(V4L2_CID_AUTO_WHITE_BALANCE)); }

void CaptureFrame();
do u find out any mistake in my socket.cpp program? If so, pls kindly tell me. Thanks a lot. :)
Topic archived. No new replies allowed.