Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:35:38+00:00 2026-06-17T08:35:38+00:00

Hi wen i build my code i get error message that is ./src/view.o: In

  • 0

Hi wen i build my code i get error message that is

./src/view.o: In function cv::Mat::MSize::MSize(int*)':
/home/burak/desktop/workspace/deneme/Debug/../src/view.cpp:13: multiple definition of
main’
./src/deneme.o:/home/burak/desktop/workspace/deneme/Debug/../src/deneme.cpp:12: first defined here
collect2: error: ld returned 1 exit status
make: * [deneme] Error 1

My code is

#include <opencv2/core/core.hpp> 
#include<opencv2/highgui/highgui.hpp>
#include<cv.h>
#include<iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
if( argc != 2)
{
 cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
 return -1;
}

Mat image;
image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

if(! image.data )                              // Check for invalid input
{
    cout <<  "Could not open or find the image" << std::endl ;
    return -1;
}
///// Show Image... and main return 0 ///

how can i solve?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:35:39+00:00Added an answer on June 17, 2026 at 8:35 am

    You’ve got two main() functions (one in view.cpp on line 13 and one in deneme.cpp on line 12). You can only have one main() function outside namespaces (i.e. as your entry point).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI. I want a function in java that automatically called. for example wen we
i just want the OVER function block gets called after 4-5 seconds wen i
I am trying to install mysql workbench on fedora 13,During that process wen i
Can some body explain me what happens ? Wen i use this url code
I installed AvalancheImagineBundle for Symfony 2.0. Everything wen't fine except the fact that it
Hi I'm trying to combine 2 projects 1. that tells me wen button on
Wen I have this code: import java.util.Scanner; import java.util.Arrays; public class Ex02 { /**
The Code below on execution in android throws IOException but not wen executed as
i got problem that when i submit form in jquery/ajax i get the data
package woot.wat.wen; import android.app.Activity; import android.os.Bundle; import android.text.Layout; import android.util.Log; import android.view.KeyEvent; import android.view.View;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.