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 9013159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:11:25+00:00 2026-06-16T03:11:25+00:00

I am currently working on a project in vala and I am having trouble

  • 0

I am currently working on a project in vala and I am having trouble getting the project to compile. The files pass through valac, just fine but then I get this error:

C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0x437): undefined reference to gtk_source_view_new'
C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0x48a): undefined reference to
gtk_source_view_set_auto_indent’
C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0x4a2): undefined reference to gtk_source_view_set_indent_on_tab'
C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0x4ba): undefined reference to
gtk_source_view_set_show_line_numbers’
C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0x4d2): undefined reference to gtk_source_view_set_highlight_current_line'
C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0x4ea): undefined reference to
gtk_source_view_set_insert_spaces_instead_of_tabs’
C:\Users\Andrew\AppData\Local\Temp/ccEYx9mD.o:EditorWindow.vala.c:(.text+0xf74): undefined reference to `gtk_source_view_get_type’

The code for the file in question that is failing is as follows:

using Gtk;
using Gtk.Stock;
using Gdk;

public class EditorWindow : GLib.Object
{
    public Gtk.SourceView EditorWindow {get;set;}
    public HBox TabHeader {get;set;}
    private Gtk.Image icon {get;set;}
    private Label name {get;set;}
    private Button closeButton {get;set;}
    public unowned Notebook parent {get;set;}


    public EditorWindow(File? file = null, Notebook parent)
    {
        //Interperet file data
        if(file == null)
        {
            this.name = new Label("testPage.cs");
        }
        else
        {
            //get all necessary file data
        }

        this.TabHeader = new HBox(false, 0);
        //this.name = new Label("testPage.cs");
        this.closeButton = new Button();
        this.closeButton.set_relief(ReliefStyle.NONE);
        this.closeButton.set_focus_on_click(false);
        this.closeButton.add(new Gtk.Image.from_stock(Gtk.Stock.CLOSE, IconSize.MENU));
        this.icon = new Gtk.Image.from_stock(Gtk.Stock.FILE, IconSize.MENU);
        this.TabHeader.pack_start(this.icon, false, false, 0);
        this.TabHeader.pack_start(this.name, true, true, 0);
        this.TabHeader.pack_start(this.closeButton, false, false, 0);
        this.EditorWindow = new Gtk.SourceView();
        this.EditorWindow.auto_indent = true;
        this.EditorWindow.indent_on_tab = true;
        this.EditorWindow.show_line_numbers = true;
        this.EditorWindow.highlight_current_line = true;
        this.EditorWindow.insert_spaces_instead_of_tabs = false;
        //parent.append_page(this.EditorWindow, this.TabHeader);

        //Read libraries to register objects and methods

        //Parse all lines and provide labels


    }

    public void ParseLibraries()
    {

    }

    public void ParseLocalFiles()
    {

    }

    public void ParseProjectFiles()
    {

    }
}

The file fails out after those five lines and says collect2: ld returne 1 exit status.

Any idea how to solve this problem? Any help at all would be appreciated.

EDIT

The command line compilation that I used was: valac Main.vala GUI.vala EditorWindow.vala -o Valarian.exe --enable-checking --pkg gtk+-2.0 --pkg gdk-2.0 --pkg gtksourceview-2.0 --thread. I am running this on windows, so I am using gtk/gdk/sourceview 2.0.

  • 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-16T03:11:26+00:00Added an answer on June 16, 2026 at 3:11 am

    I don’t like to answer my own question on here, but since we were looking in the wrong direction, here goes:

    The problem that I was experiencing where the compiler was running into ‘undefined reference’ errors was caused by the manually applied namespace ‘Gtk’ before SourceView at the top of the EditorWindow class. Due to the nature of the Vala compiler, it did not throw an error because SourceView is under the Gtk namespace, but apparently something went wrong between valac and gcc. As soon as I changed Gtk.SourceView to SourceView, the program compiled.

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

Sidebar

Related Questions

I am currently working on a project that is looking at having a database
I'm currently working a project which based on spring MVC, it's just a standard
Currently working on a project I'm uploading a series of JSON files to Amazon
I'm currently working on a project to build a small compiler just for the
I'm currently working on a project that's getting more complex than I thought it
I'm currently working on project with Haskell, and have found myself some trouble. I'm
I'm currently working on a project where users will upload projects, but others users
I'm currently working through Project Euler problems as a way of learning C and
I'm currently working on project, Android Internet Download Manager. In order to download the
I am currently working on Project Euler for fun, and use Haskell for practicing.

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.